!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="1.12.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(e.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:g,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){var b=a&&a.toString();return!n.isArray(a)&&b-parseFloat(b)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!k.call(a,"constructor")&&!k.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(!l.ownFirst)for(b in a)return k.call(a,b);for(b in a);return void 0===b||k.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?i[j.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(s(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):g.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(h)return h.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,g=0,h=[];if(s(a))for(d=a.length;d>g;g++)e=b(a[g],g,c),null!=e&&h.push(e);else for(g in a)e=b(a[g],g,c),null!=e&&h.push(e);return f.apply([],h)},guid:1,proxy:function(a,b){var c,d,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=e.call(arguments,2),d=function(){return a.apply(b||this,c.concat(e.call(arguments)))},d.guid=a.guid=a.guid||n.guid++,d):void 0},now:function(){return+new Date},support:l}),"function"==typeof Symbol&&(n.fn[Symbol.iterator]=c[Symbol.iterator]),n.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){i["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=!!a&&"length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ga(),z=ga(),A=ga(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+L+"*\\]",O=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",P=new RegExp(L+"+","g"),Q=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),R=new RegExp("^"+L+"*,"+L+"*"),S=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),T=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),U=new RegExp(O),V=new RegExp("^"+M+"$"),W={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_=/[+~]/,aa=/'|\\/g,ba=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),ca=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},da=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(ea){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fa(a,b,d,e){var f,h,j,k,l,o,r,s,w=b&&b.ownerDocument,x=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==x&&9!==x&&11!==x)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==x&&(o=$.exec(a)))if(f=o[1]){if(9===x){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(w&&(j=w.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(o[2])return H.apply(d,b.getElementsByTagName(a)),d;if((f=o[3])&&c.getElementsByClassName&&b.getElementsByClassName)return H.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==x)w=b,s=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(aa,"\\$&"):b.setAttribute("id",k=u),r=g(a),h=r.length,l=V.test(k)?"#"+k:"[id='"+k+"']";while(h--)r[h]=l+" "+qa(r[h]);s=r.join(","),w=_.test(a)&&oa(b.parentNode)||b}if(s)try{return H.apply(d,w.querySelectorAll(s)),d}catch(y){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(Q,"$1"),b,d,e)}function ga(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ha(a){return a[u]=!0,a}function ia(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ja(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function ka(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function la(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function na(a){return ha(function(b){return b=+b,ha(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function oa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=fa.support={},f=fa.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fa.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ia(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ia(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Z.test(n.getElementsByClassName),c.getById=ia(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return"undefined"!=typeof b.getElementsByClassName&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=Z.test(n.querySelectorAll))&&(ia(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ia(function(a){var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Z.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ia(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",O)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Z.test(o.compareDocumentPosition),t=b||Z.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return ka(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?ka(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},fa.matches=function(a,b){return fa(a,null,null,b)},fa.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(T,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fa(b,n,null,[a]).length>0},fa.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fa.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fa.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fa.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fa.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fa.selectors={cacheLength:50,createPseudo:ha,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ba,ca),a[3]=(a[3]||a[4]||a[5]||"").replace(ba,ca),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fa.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fa.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return W.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&U.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ba,ca).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fa.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(P," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fa.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ha(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ha(function(a){var b=[],c=[],d=h(a.replace(Q,"$1"));return d[u]?ha(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ha(function(a){return function(b){return fa(a,b).length>0}}),contains:ha(function(a){return a=a.replace(ba,ca),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ha(function(a){return V.test(a||"")||fa.error("unsupported lang: "+a),a=a.replace(ba,ca).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Y.test(a.nodeName)},input:function(a){return X.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:na(function(){return[0]}),last:na(function(a,b){return[b-1]}),eq:na(function(a,b,c){return[0>c?c+b:c]}),even:na(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:na(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:na(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:na(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function ra(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(j=b[u]||(b[u]={}),i=j[b.uniqueID]||(j[b.uniqueID]={}),(h=i[d])&&h[0]===w&&h[1]===f)return k[2]=h[2];if(i[d]=k,k[2]=a(b,c,g))return!0}}}function sa(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ta(a,b,c){for(var d=0,e=b.length;e>d;d++)fa(a,b[d],c);return c}function ua(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function va(a,b,c,d,e,f){return d&&!d[u]&&(d=va(d)),e&&!e[u]&&(e=va(e,f)),ha(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ta(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ua(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ua(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ua(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function wa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ra(function(a){return a===b},h,!0),l=ra(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[ra(sa(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return va(i>1&&sa(m),i>1&&qa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(Q,"$1"),c,e>i&&wa(a.slice(i,e)),f>e&&wa(a=a.slice(e)),f>e&&qa(a))}m.push(c)}return sa(m)}function xa(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=F.call(i));u=ua(u)}H.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&fa.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ha(f):f}return h=fa.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xa(e,d)),f.selector=a}return f},i=fa.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ba,ca),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=W.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ba,ca),_.test(j[0].type)&&oa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qa(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||_.test(a)&&oa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ia(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ia(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ja("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ia(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ja("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ia(function(a){return null==a.getAttribute("disabled")})||ja(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fa}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.uniqueSort=n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},v=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},w=n.expr.match.needsContext,x=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,y=/^.[^:#\[\.,]*$/;function z(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(y.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>-1!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(z(this,a||[],!1))},not:function(a){return this.pushStack(z(this,a||[],!0))},is:function(a){return!!z(this,"string"==typeof a&&w.test(a)?n(a):a||[],!1).length}});var A,B=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=n.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||A,"string"==typeof a){if(e="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:B.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),x.test(e[1])&&n.isPlainObject(b))for(e in b)n.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}if(f=d.getElementById(e[2]),f&&f.parentNode){if(f.id!==e[2])return A.find(a);this.length=1,this[0]=f}return this.context=d,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof c.ready?c.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};C.prototype=n.fn,A=n(d);var D=/^(?:parents|prev(?:Until|All))/,E={children:!0,contents:!0,next:!0,prev:!0};n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=w.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.uniqueSort(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function F(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return u(a,"parentNode")},parentsUntil:function(a,b,c){return u(a,"parentNode",c)},next:function(a){return F(a,"nextSibling")},prev:function(a){return F(a,"previousSibling")},nextAll:function(a){return u(a,"nextSibling")},prevAll:function(a){return u(a,"previousSibling")},nextUntil:function(a,b,c){return u(a,"nextSibling",c)},prevUntil:function(a,b,c){return u(a,"previousSibling",c)},siblings:function(a){return v((a.parentNode||{}).firstChild,a)},children:function(a){return v(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(E[a]||(e=n.uniqueSort(e)),D.test(a)&&(e=e.reverse())),this.pushStack(e)}});var G=/\S+/g;function H(a){var b={};return n.each(a.match(G)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?H(a):n.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h-1)f.splice(c,1),h>=c&&h--}),this},has:function(a){return a?n.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=!0,c||j.disable(),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().progress(c.notify).done(c.resolve).fail(c.reject):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=e.call(arguments),d=c.length,f=1!==d||a&&n.isFunction(a.promise)?d:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?e.call(arguments):d,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(d>1)for(i=new Array(d),j=new Array(d),k=new Array(d);d>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().progress(h(b,j,i)).done(h(b,k,c)).fail(g.reject):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(d,[n]),n.fn.triggerHandler&&(n(d).triggerHandler("ready"),n(d).off("ready"))))}});function J(){d.addEventListener?(d.removeEventListener("DOMContentLoaded",K),a.removeEventListener("load",K)):(d.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(d.addEventListener||"load"===a.event.type||"complete"===d.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll)a.setTimeout(n.ready);else if(d.addEventListener)d.addEventListener("DOMContentLoaded",K),a.addEventListener("load",K);else{d.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&d.documentElement}catch(e){}c&&c.doScroll&&!function f(){if(!n.isReady){try{c.doScroll("left")}catch(b){return a.setTimeout(f,50)}J(),n.ready()}}()}return I.promise(b)},n.ready.promise();var L;for(L in n(l))break;l.ownFirst="0"===L,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c,e;c=d.getElementsByTagName("body")[0],c&&c.style&&(b=d.createElement("div"),e=d.createElement("div"),e.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(e).appendChild(b),"undefined"!=typeof b.style.zoom&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",l.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(e))}),function(){var a=d.createElement("div");l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}a=null}();var M=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b},N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0; }return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(M(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),"object"!=typeof b&&"function"!=typeof b||(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f}}function S(a,b,c){if(M(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=void 0)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},Z=/^(?:checkbox|radio)$/i,$=/<([\w:-]+)/,_=/^$|\/(?:java|ecma)script/i,aa=/^\s+/,ba="abbr|article|aside|audio|bdi|canvas|data|datalist|details|dialog|figcaption|figure|footer|header|hgroup|main|mark|meter|nav|output|picture|progress|section|summary|template|time|video";function ca(a){var b=ba.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}!function(){var a=d.createElement("div"),b=d.createDocumentFragment(),c=d.createElement("input");a.innerHTML="
a",l.leadingWhitespace=3===a.firstChild.nodeType,l.tbody=!a.getElementsByTagName("tbody").length,l.htmlSerialize=!!a.getElementsByTagName("link").length,l.html5Clone="<:nav>"!==d.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,b.appendChild(c),l.appendChecked=c.checked,a.innerHTML="",l.noCloneChecked=!!a.cloneNode(!0).lastChild.defaultValue,b.appendChild(a),c=d.createElement("input"),c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),a.appendChild(c),l.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!!a.addEventListener,a[n.expando]=1,l.attributes=!a.getAttribute(n.expando)}();var da={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:l.htmlSerialize?[0,"",""]:[1,"X
","
"]};da.optgroup=da.option,da.tbody=da.tfoot=da.colgroup=da.caption=da.thead,da.th=da.td;function ea(a,b){var c,d,e=0,f="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,ea(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function fa(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}var ga=/<|&#?\w+;/,ha=/r;r++)if(g=a[r],g||0===g)if("object"===n.type(g))n.merge(q,g.nodeType?[g]:g);else if(ga.test(g)){i=i||p.appendChild(b.createElement("div")),j=($.exec(g)||["",""])[1].toLowerCase(),m=da[j]||da._default,i.innerHTML=m[1]+n.htmlPrefilter(g)+m[2],f=m[0];while(f--)i=i.lastChild;if(!l.leadingWhitespace&&aa.test(g)&&q.push(b.createTextNode(aa.exec(g)[0])),!l.tbody){g="table"!==j||ha.test(g)?""!==m[1]||ha.test(g)?0:i:i.firstChild,f=g&&g.childNodes.length;while(f--)n.nodeName(k=g.childNodes[f],"tbody")&&!k.childNodes.length&&g.removeChild(k)}n.merge(q,i.childNodes),i.textContent="";while(i.firstChild)i.removeChild(i.firstChild);i=p.lastChild}else q.push(b.createTextNode(g));i&&p.removeChild(i),l.appendChecked||n.grep(ea(q,"input"),ia),r=0;while(g=q[r++])if(d&&n.inArray(g,d)>-1)e&&e.push(g);else if(h=n.contains(g.ownerDocument,g),i=ea(p.appendChild(g),"script"),h&&fa(i),c){f=0;while(g=i[f++])_.test(g.type||"")&&c.push(g)}return i=null,p}!function(){var b,c,e=d.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b]=c in a)||(e.setAttribute(c,"t"),l[b]=e.attributes[c].expando===!1);e=null}();var ka=/^(?:input|select|textarea)$/i,la=/^key/,ma=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,na=/^(?:focusinfocus|focusoutblur)$/,oa=/^([^.]*)(?:\.(.+)|)/;function pa(){return!0}function qa(){return!1}function ra(){try{return d.activeElement}catch(a){}}function sa(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)sa(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=qa;else if(!e)return a;return 1===f&&(g=e,e=function(a){return n().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=n.guid++)),a.each(function(){n.event.add(this,b,e,d,c)})}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return"undefined"==typeof n||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(G)||[""],h=b.length;while(h--)f=oa.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(G)||[""],j=b.length;while(j--)if(h=oa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,e,f){var g,h,i,j,l,m,o,p=[e||d],q=k.call(b,"type")?b.type:b,r=k.call(b,"namespace")?b.namespace.split("."):[];if(i=m=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!na.test(q+n.event.triggered)&&(q.indexOf(".")>-1&&(r=q.split("."),q=r.shift(),r.sort()),h=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=r.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:n.makeArray(c,[b]),l=n.event.special[q]||{},f||!l.trigger||l.trigger.apply(e,c)!==!1)){if(!f&&!l.noBubble&&!n.isWindow(e)){for(j=l.delegateType||q,na.test(j+q)||(i=i.parentNode);i;i=i.parentNode)p.push(i),m=i;m===(e.ownerDocument||d)&&p.push(m.defaultView||m.parentWindow||a)}o=0;while((i=p[o++])&&!b.isPropagationStopped())b.type=o>1?j:l.bindType||q,g=(n._data(i,"events")||{})[b.type]&&n._data(i,"handle"),g&&g.apply(i,c),g=h&&i[h],g&&g.apply&&M(i)&&(b.result=g.apply(i,c),b.result===!1&&b.preventDefault());if(b.type=q,!f&&!b.isDefaultPrevented()&&(!l._default||l._default.apply(p.pop(),c)===!1)&&M(e)&&h&&e[q]&&!n.isWindow(e)){m=e[h],m&&(e[h]=null),n.event.triggered=q;try{e[q]()}catch(s){}n.event.triggered=void 0,m&&(e[h]=m)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,d,f,g,h=[],i=e.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())a.rnamespace&&!a.rnamespace.test(g.namespace)||(a.handleObj=g,a.data=g.data,d=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>-1:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]","i"),va=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,wa=/\s*$/g,Aa=ca(d),Ba=Aa.appendChild(d.createElement("div"));function Ca(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function Da(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function Ea(a){var b=ya.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Fa(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Ga(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(Da(b).text=a.text,Ea(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&Z.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}}function Ha(a,b,c,d){b=f.apply([],b);var e,g,h,i,j,k,m=0,o=a.length,p=o-1,q=b[0],r=n.isFunction(q);if(r||o>1&&"string"==typeof q&&!l.checkClone&&xa.test(q))return a.each(function(e){var f=a.eq(e);r&&(b[0]=q.call(this,e,f.html())),Ha(f,b,c,d)});if(o&&(k=ja(b,a[0].ownerDocument,!1,a,d),e=k.firstChild,1===k.childNodes.length&&(k=e),e||d)){for(i=n.map(ea(k,"script"),Da),h=i.length;o>m;m++)g=k,m!==p&&(g=n.clone(g,!0,!0),h&&n.merge(i,ea(g,"script"))),c.call(a[m],g,m);if(h)for(j=i[i.length-1].ownerDocument,n.map(i,Ea),m=0;h>m;m++)g=i[m],_.test(g.type||"")&&!n._data(g,"globalEval")&&n.contains(j,g)&&(g.src?n._evalUrl&&n._evalUrl(g.src):n.globalEval((g.text||g.textContent||g.innerHTML||"").replace(za,"")));k=e=null}return a}function Ia(a,b,c){for(var d,e=b?n.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||n.cleanData(ea(d)),d.parentNode&&(c&&n.contains(d.ownerDocument,d)&&fa(ea(d,"script")),d.parentNode.removeChild(d));return a}n.extend({htmlPrefilter:function(a){return a.replace(va,"<$1>")},clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!ua.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(Ba.innerHTML=a.outerHTML,Ba.removeChild(f=Ba.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=ea(f),h=ea(a),g=0;null!=(e=h[g]);++g)d[g]&&Ga(e,d[g]);if(b)if(c)for(h=h||ea(a),d=d||ea(f),g=0;null!=(e=h[g]);g++)Fa(e,d[g]);else Fa(a,f);return d=ea(f,"script"),d.length>0&&fa(d,!i&&ea(a,"script")),d=h=e=null,f},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.attributes,m=n.event.special;null!=(d=a[h]);h++)if((b||M(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k||"undefined"==typeof d.removeAttribute?d[i]=void 0:d.removeAttribute(i),c.push(f))}}}),n.fn.extend({domManip:Ha,detach:function(a){return Ia(this,a,!0)},remove:function(a){return Ia(this,a)},text:function(a){return Y(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||d).createTextNode(a))},null,a,arguments.length)},append:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.appendChild(a)}})},prepend:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(ea(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return Y(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(ta,""):void 0;if("string"==typeof a&&!wa.test(a)&&(l.htmlSerialize||!ua.test(a))&&(l.leadingWhitespace||!aa.test(a))&&!da[($.exec(a)||["",""])[1].toLowerCase()]){a=n.htmlPrefilter(a);try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ea(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return Ha(this,arguments,function(b){var c=this.parentNode;n.inArray(this,a)<0&&(n.cleanData(ea(this)),c&&c.replaceChild(b,this))},a)}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],f=n(a),h=f.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(f[d])[b](c),g.apply(e,c.get());return this.pushStack(e)}});var Ja,Ka={HTML:"block",BODY:"block"};function La(a,b){var c=n(b.createElement(a)).appendTo(b.body),d=n.css(c[0],"display");return c.detach(),d}function Ma(a){var b=d,c=Ka[a];return c||(c=La(a,b),"none"!==c&&c||(Ja=(Ja||n("', inline_markup: '
{content}
', custom_markup: '', social_tools: '' }, pp_settings); var matchedObjects=this, percentBased=false, pp_dimensions, pp_open, pp_contentHeight, pp_contentWidth, pp_containerHeight, pp_containerWidth, windowHeight=$(window).height(), windowWidth=$(window).width(), pp_slideshow; doresize=true, scroll_pos=_get_scroll(); $(window).unbind('resize.prettyphoto').bind('resize.prettyphoto',function(){ _center_overlay(); _resize_overlay(); }); if(pp_settings.keyboard_shortcuts){ $(document).unbind('keydown.prettyphoto').bind('keydown.prettyphoto',function(e){ if(typeof $pp_pic_holder!='undefined'){ if($pp_pic_holder.is(':visible')){ switch(e.keyCode){ case 37: $.prettyPhoto.changePage('previous'); e.preventDefault(); break; case 39: $.prettyPhoto.changePage('next'); e.preventDefault(); break; case 27: if(!settings.modal) $.prettyPhoto.close(); e.preventDefault(); break; };}; };}); }; $.prettyPhoto.initialize=function(){ settings=pp_settings; if(settings.theme=='pp_default') settings.horizontal_padding=16; theRel=$(this).attr(settings.hook); galleryRegExp=/\[(?:.*)\]/; isSet=(galleryRegExp.exec(theRel)) ? true:false; pp_images=(isSet) ? jQuery.map(matchedObjects, function(n, i){ if($(n).attr(settings.hook).indexOf(theRel)!=-1) return $(n).attr('href'); }):$.makeArray($(this).attr('href')); pp_titles=(isSet) ? jQuery.map(matchedObjects, function(n, i){ if($(n).attr(settings.hook).indexOf(theRel)!=-1) return ($(n).find('img').attr('alt')) ? $(n).find('img').attr('alt'):""; }):$.makeArray($(this).find('img').attr('alt')); pp_descriptions=(isSet) ? jQuery.map(matchedObjects, function(n, i){ if($(n).attr(settings.hook).indexOf(theRel)!=-1) return ($(n).attr('title')) ? $(n).attr('title'):""; }):$.makeArray($(this).attr('title')); if(pp_images.length > settings.overlay_gallery_max) settings.overlay_gallery=false; set_position=jQuery.inArray($(this).attr('href'), pp_images); rel_index=(isSet) ? set_position:$("a["+settings.hook+"^='"+theRel+"']").index($(this)); _build_overlay(this); if(settings.allow_resize) $(window).bind('scroll.prettyphoto',function(){ _center_overlay(); }); $.prettyPhoto.open(); return false; } $.prettyPhoto.open=function(event){ if(typeof settings=="undefined"){ settings=pp_settings; pp_images=$.makeArray(arguments[0]); pp_titles=(arguments[1]) ? $.makeArray(arguments[1]):$.makeArray(""); pp_descriptions=(arguments[2]) ? $.makeArray(arguments[2]):$.makeArray(""); isSet=(pp_images.length > 1) ? true:false; set_position=(arguments[3])? arguments[3]: 0; _build_overlay(event.target); } if(settings.hideflash) $('object,embed,iframe[src*=youtube],iframe[src*=vimeo]').css('visibility','hidden'); _checkPosition($(pp_images).size()); $('.pp_loaderIcon').show(); if(settings.deeplinking) setHashtag(); if(settings.social_tools){ facebook_like_link=settings.social_tools.replace('{location_href}', encodeURIComponent(location.href)); $pp_pic_holder.find('.pp_social').html(facebook_like_link); } if($ppt.is(':hidden')) $ppt.css('opacity',0).show(); $pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity); $pp_pic_holder.find('.currentTextHolder').text((set_position+1) + settings.counter_separator_label + $(pp_images).size()); if(typeof pp_descriptions[set_position]!='undefined'&&pp_descriptions[set_position]!=""){ $pp_pic_holder.find('.pp_description').show().html(unescape(pp_descriptions[set_position])); }else{ $pp_pic_holder.find('.pp_description').hide(); } movie_width=(parseFloat(getParam('width',pp_images[set_position]))) ? getParam('width',pp_images[set_position]):settings.default_width.toString(); movie_height=(parseFloat(getParam('height',pp_images[set_position]))) ? getParam('height',pp_images[set_position]):settings.default_height.toString(); percentBased=false; if(movie_height.indexOf('%')!=-1){ movie_height=parseFloat(($(window).height() * parseFloat(movie_height) / 100) - 150); percentBased=true; } if(movie_width.indexOf('%')!=-1){ movie_width=parseFloat(($(window).width() * parseFloat(movie_width) / 100) - 150); percentBased=true; } $pp_pic_holder.fadeIn(function(){ (settings.show_title&&pp_titles[set_position]!=""&&typeof pp_titles[set_position]!="undefined") ? $ppt.html(unescape(pp_titles[set_position])):$ppt.html(' '); imgPreloader=""; skipInjection=false; switch(_getFileType(pp_images[set_position])){ case 'image': imgPreloader=new Image(); nextImage=new Image(); if(isSet&&set_position < $(pp_images).size() -1) nextImage.src=pp_images[set_position + 1]; prevImage=new Image(); if(isSet&&pp_images[set_position - 1]) prevImage.src=pp_images[set_position - 1]; $pp_pic_holder.find('#pp_full_res')[0].innerHTML=settings.image_markup.replace(/{path}/g,pp_images[set_position]); imgPreloader.onload=function(){ pp_dimensions=_fitToViewport(imgPreloader.width,imgPreloader.height); _showContent(); }; imgPreloader.onerror=function(){ alert('Image cannot be loaded. Make sure the path is correct and image exist.'); $.prettyPhoto.close(); }; imgPreloader.src=pp_images[set_position]; break; case 'youtube': pp_dimensions=_fitToViewport(movie_width,movie_height); movie_id=getParam('v',pp_images[set_position]); if(movie_id==""){ movie_id=pp_images[set_position].split('youtu.be/'); movie_id=movie_id[1]; if(movie_id.indexOf('?') > 0) movie_id=movie_id.substr(0,movie_id.indexOf('?')); if(movie_id.indexOf('&') > 0) movie_id=movie_id.substr(0,movie_id.indexOf('&')); } movie='http://www.youtube.com/embed/'+movie_id; (getParam('rel',pp_images[set_position])) ? movie+="?rel="+getParam('rel',pp_images[set_position]):movie+="?rel=1"; if(settings.autoplay) movie +="&autoplay=1"; toInject=settings.iframe_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie); break; case 'vimeo': pp_dimensions=_fitToViewport(movie_width,movie_height); movie_id=pp_images[set_position]; var regExp=/http(s?):\/\/(www\.)?vimeo.com\/(\d+)/; var match=movie_id.match(regExp); movie='http://player.vimeo.com/video/'+ match[3] +'?title=0&byline=0&portrait=0'; if(settings.autoplay) movie +="&autoplay=1;"; vimeo_width=pp_dimensions['width'] + '/embed/?moog_width='+ pp_dimensions['width']; toInject=settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,pp_dimensions['height']).replace(/{path}/g,movie); break; case 'quicktime': pp_dimensions=_fitToViewport(movie_width,movie_height); pp_dimensions['height']+=15; pp_dimensions['contentHeight']+=15; pp_dimensions['containerHeight']+=15; toInject=settings.quicktime_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay); break; case 'flash': pp_dimensions=_fitToViewport(movie_width,movie_height); flash_vars=pp_images[set_position]; flash_vars=flash_vars.substring(pp_images[set_position].indexOf('flashvars') + 10,pp_images[set_position].length); filename=pp_images[set_position]; filename=filename.substring(0,filename.indexOf('?')); toInject=settings.flash_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+'?'+flash_vars); break; case 'iframe': pp_dimensions=_fitToViewport(movie_width,movie_height); frame_url=pp_images[set_position]; frame_url=frame_url.substr(0,frame_url.indexOf('iframe')-1); toInject=settings.iframe_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{path}/g,frame_url); break; case 'ajax': doresize=false; pp_dimensions=_fitToViewport(movie_width,movie_height); doresize=true; skipInjection=true; $.get(pp_images[set_position],function(responseHTML){ toInject=settings.inline_markup.replace(/{content}/g,responseHTML); $pp_pic_holder.find('#pp_full_res')[0].innerHTML=toInject; _showContent(); }); break; case 'custom': pp_dimensions=_fitToViewport(movie_width,movie_height); toInject=settings.custom_markup; break; case 'inline': myClone=$(pp_images[set_position]).clone().append('
').css({'width':settings.default_width}).wrapInner('
').appendTo($('body')).show(); doresize=false; pp_dimensions=_fitToViewport($(myClone).width(),$(myClone).height()); doresize=true; $(myClone).remove(); toInject=settings.inline_markup.replace(/{content}/g,$(pp_images[set_position]).html()); break; }; if(!imgPreloader&&!skipInjection){ $pp_pic_holder.find('#pp_full_res')[0].innerHTML=toInject; _showContent(); };}); return false; }; $.prettyPhoto.changePage=function(direction){ currentGalleryPage=0; if(direction=='previous'){ set_position--; if(set_position < 0) set_position=$(pp_images).size()-1; }else if(direction=='next'){ set_position++; if(set_position > $(pp_images).size()-1) set_position=0; }else{ set_position=direction; }; rel_index=set_position; if(!doresize) doresize=true; if(settings.allow_expand){ $('.pp_contract').removeClass('pp_contract').addClass('pp_expand'); } _hideContent(function(){ $.prettyPhoto.open(); }); }; $.prettyPhoto.changeGalleryPage=function(direction){ if(direction=='next'){ currentGalleryPage ++; if(currentGalleryPage > totalPage) currentGalleryPage=0; }else if(direction=='previous'){ currentGalleryPage --; if(currentGalleryPage < 0) currentGalleryPage=totalPage; }else{ currentGalleryPage=direction; }; slide_speed=(direction=='next'||direction=='previous') ? settings.animation_speed:0; slide_to=currentGalleryPage * (itemsPerPage * itemWidth); $pp_gallery.find('ul').animate({left:-slide_to},slide_speed); }; $.prettyPhoto.startSlideshow=function(){ if(typeof pp_slideshow=='undefined'){ $pp_pic_holder.find('.pp_play').unbind('click').removeClass('pp_play').addClass('pp_pause').click(function(){ $.prettyPhoto.stopSlideshow(); return false; }); pp_slideshow=setInterval($.prettyPhoto.startSlideshow,settings.slideshow); }else{ $.prettyPhoto.changePage('next'); };} $.prettyPhoto.stopSlideshow=function(){ $pp_pic_holder.find('.pp_pause').unbind('click').removeClass('pp_pause').addClass('pp_play').click(function(){ $.prettyPhoto.startSlideshow(); return false; }); clearInterval(pp_slideshow); pp_slideshow=undefined; } $.prettyPhoto.close=function(){ if($pp_overlay.is(":animated")) return; $.prettyPhoto.stopSlideshow(); $pp_pic_holder.stop().find('object,embed').css('visibility','hidden'); $('div.pp_pic_holder,div.ppt,.pp_fade').fadeOut(settings.animation_speed,function(){ $(this).remove(); }); $pp_overlay.fadeOut(settings.animation_speed, function(){ if(settings.hideflash) $('object,embed,iframe[src*=youtube],iframe[src*=vimeo]').css('visibility','visible'); $(this).remove(); $(window).unbind('scroll.prettyphoto'); clearHashtag(); settings.callback(); doresize=true; pp_open=false; delete settings; }); }; function _showContent(){ $('.pp_loaderIcon').hide(); projectedTop=scroll_pos['scrollTop'] + ((windowHeight/2) - (pp_dimensions['containerHeight']/2)); if(projectedTop < 0) projectedTop=0; $ppt.fadeTo(settings.animation_speed,1); $pp_pic_holder.find('.pp_content') .animate({ height:pp_dimensions['contentHeight'], width:pp_dimensions['contentWidth'] },settings.animation_speed); $pp_pic_holder.animate({ 'top': projectedTop, 'left': ((windowWidth/2) - (pp_dimensions['containerWidth']/2) < 0) ? 0:(windowWidth/2) - (pp_dimensions['containerWidth']/2), width:pp_dimensions['containerWidth'] },settings.animation_speed,function(){ $pp_pic_holder.find('.pp_hoverContainer,#fullResImage').height(pp_dimensions['height']).width(pp_dimensions['width']); $pp_pic_holder.find('.pp_fade').fadeIn(settings.animation_speed); if(isSet&&_getFileType(pp_images[set_position])=="image"){ $pp_pic_holder.find('.pp_hoverContainer').show(); }else{ $pp_pic_holder.find('.pp_hoverContainer').hide(); } if(settings.allow_expand){ if(pp_dimensions['resized']){ $('a.pp_expand,a.pp_contract').show(); }else{ $('a.pp_expand').hide(); }} if(settings.autoplay_slideshow&&!pp_slideshow&&!pp_open) $.prettyPhoto.startSlideshow(); settings.changepicturecallback(); pp_open=true; }); _insert_gallery(); pp_settings.ajaxcallback(); }; function _hideContent(callback){ $pp_pic_holder.find('#pp_full_res object,#pp_full_res embed').css('visibility','hidden'); $pp_pic_holder.find('.pp_fade').fadeOut(settings.animation_speed,function(){ $('.pp_loaderIcon').show(); callback(); }); }; function _checkPosition(setCount){ (setCount > 1) ? $('.pp_nav').show():$('.pp_nav').hide(); }; function _fitToViewport(width,height){ resized=false; _getDimensions(width,height); imageWidth=width, imageHeight=height; if(((pp_containerWidth > windowWidth)||(pp_containerHeight > windowHeight))&&doresize&&settings.allow_resize&&!percentBased){ resized=true, fitting=false; while (!fitting){ if((pp_containerWidth > windowWidth)){ imageWidth=(windowWidth - 200); imageHeight=(height/width) * imageWidth; }else if((pp_containerHeight > windowHeight)){ imageHeight=(windowHeight - 200); imageWidth=(width/height) * imageHeight; }else{ fitting=true; }; pp_containerHeight=imageHeight, pp_containerWidth=imageWidth; }; if((pp_containerWidth > windowWidth)||(pp_containerHeight > windowHeight)){ _fitToViewport(pp_containerWidth,pp_containerHeight) }; _getDimensions(imageWidth,imageHeight); }; return { width:Math.floor(imageWidth), height:Math.floor(imageHeight), containerHeight:Math.floor(pp_containerHeight), containerWidth:Math.floor(pp_containerWidth) + (settings.horizontal_padding * 2), contentHeight:Math.floor(pp_contentHeight), contentWidth:Math.floor(pp_contentWidth), resized:resized };}; function _getDimensions(width,height){ width=parseFloat(width); height=parseFloat(height); $pp_details=$pp_pic_holder.find('.pp_details'); $pp_details.width(width); detailsHeight=parseFloat($pp_details.css('marginTop')) + parseFloat($pp_details.css('marginBottom')); $pp_details=$pp_details.clone().addClass(settings.theme).width(width).appendTo($('body')).css({ 'position':'absolute', 'top':-10000 }); detailsHeight +=$pp_details.height(); detailsHeight=(detailsHeight <=34) ? 36:detailsHeight; $pp_details.remove(); $pp_title=$pp_pic_holder.find('.ppt'); $pp_title.width(width); titleHeight=parseFloat($pp_title.css('marginTop')) + parseFloat($pp_title.css('marginBottom')); $pp_title=$pp_title.clone().appendTo($('body')).css({ 'position':'absolute', 'top':-10000 }); titleHeight +=$pp_title.height(); $pp_title.remove(); pp_contentHeight=height + detailsHeight; pp_contentWidth=width; pp_containerHeight=pp_contentHeight + titleHeight + $pp_pic_holder.find('.pp_top').height() + $pp_pic_holder.find('.pp_bottom').height(); pp_containerWidth=width; } function _getFileType(itemSrc){ if(itemSrc.match(/youtube\.com\/watch/i)||itemSrc.match(/youtu\.be/i)){ return 'youtube'; }else if(itemSrc.match(/vimeo\.com/i)){ return 'vimeo'; }else if(itemSrc.match(/\b.mov\b/i)){ return 'quicktime'; }else if(itemSrc.match(/\b.swf\b/i)){ return 'flash'; }else if(itemSrc.match(/\biframe=true\b/i)){ return 'iframe'; }else if(itemSrc.match(/\bajax=true\b/i)){ return 'ajax'; }else if(itemSrc.match(/\bcustom=true\b/i)){ return 'custom'; }else if(itemSrc.substr(0,1)=='#'){ return 'inline'; }else{ return 'image'; };}; function _center_overlay(){ if(doresize&&typeof $pp_pic_holder!='undefined'){ scroll_pos=_get_scroll(); contentHeight=$pp_pic_holder.height(), contentwidth=$pp_pic_holder.width(); projectedTop=(windowHeight/2) + scroll_pos['scrollTop'] - (contentHeight/2); if(projectedTop < 0) projectedTop=0; if(contentHeight > windowHeight) return; $pp_pic_holder.css({ 'top': projectedTop, 'left': (windowWidth/2) + scroll_pos['scrollLeft'] - (contentwidth/2) }); };}; function _get_scroll(){ if(self.pageYOffset){ return {scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset};}else if(document.documentElement&&document.documentElement.scrollTop){ return {scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft};}else if(document.body){ return {scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft};}; }; function _resize_overlay(){ windowHeight=$(window).height(), windowWidth=$(window).width(); if(typeof $pp_overlay!="undefined") $pp_overlay.height($(document).height()).width(windowWidth); }; function _insert_gallery(){ if(isSet&&settings.overlay_gallery&&_getFileType(pp_images[set_position])=="image"){ itemWidth=52+5; navWidth=(settings.theme=="facebook"||settings.theme=="pp_default") ? 50:30; itemsPerPage=Math.floor((pp_dimensions['containerWidth'] - 100 - navWidth) / itemWidth); itemsPerPage=(itemsPerPage < pp_images.length) ? itemsPerPage:pp_images.length; totalPage=Math.ceil(pp_images.length / itemsPerPage) - 1; if(totalPage==0){ navWidth=0; $pp_gallery.find('.pp_arrow_next,.pp_arrow_previous').hide(); }else{ $pp_gallery.find('.pp_arrow_next,.pp_arrow_previous').show(); }; galleryWidth=itemsPerPage * itemWidth; fullGalleryWidth=pp_images.length * itemWidth; $pp_gallery .css('margin-left',-((galleryWidth/2) + (navWidth/2))) .find('div:first').width(galleryWidth+5) .find('ul').width(fullGalleryWidth) .find('li.selected').removeClass('selected'); goToPage=(Math.floor(set_position/itemsPerPage) < totalPage) ? Math.floor(set_position/itemsPerPage):totalPage; $.prettyPhoto.changeGalleryPage(goToPage); $pp_gallery_li.filter(':eq('+set_position+')').addClass('selected'); }else{ $pp_pic_holder.find('.pp_content').unbind('mouseenter mouseleave'); }} function _build_overlay(caller){ if(settings.social_tools) facebook_like_link=settings.social_tools.replace('{location_href}', encodeURIComponent(location.href)); settings.markup=settings.markup.replace('{pp_social}',''); $('body').append(settings.markup); $pp_pic_holder=$('.pp_pic_holder') , $ppt=$('.ppt'), $pp_overlay=$('div.pp_overlay'); if(isSet&&settings.overlay_gallery){ currentGalleryPage=0; toInject=""; for (var i=0; i < pp_images.length; i++){ if(!pp_images[i].match(/\b(jpg|jpeg|png|gif)\b/gi)){ classname='default'; img_src=''; }else{ classname=''; img_src=pp_images[i]; } toInject +="
  • "; }; toInject=settings.gallery_markup.replace(/{gallery}/g,toInject); $pp_pic_holder.find('#pp_full_res').after(toInject); $pp_gallery=$('.pp_pic_holder .pp_gallery'), $pp_gallery_li=$pp_gallery.find('li'); $pp_gallery.find('.pp_arrow_next').click(function(){ $.prettyPhoto.changeGalleryPage('next'); $.prettyPhoto.stopSlideshow(); return false; }); $pp_gallery.find('.pp_arrow_previous').click(function(){ $.prettyPhoto.changeGalleryPage('previous'); $.prettyPhoto.stopSlideshow(); return false; }); $pp_pic_holder.find('.pp_content').hover(function(){ $pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeIn(); }, function(){ $pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeOut(); }); itemWidth=52+5; $pp_gallery_li.each(function(i){ $(this) .find('a') .click(function(){ $.prettyPhoto.changePage(i); $.prettyPhoto.stopSlideshow(); return false; }); }); }; if(settings.slideshow){ $pp_pic_holder.find('.pp_nav').prepend('Play') $pp_pic_holder.find('.pp_nav .pp_play').click(function(){ $.prettyPhoto.startSlideshow(); return false; }); } $pp_pic_holder.attr('class','pp_pic_holder ' + settings.theme); $pp_overlay .css({ 'opacity':0, 'height':$(document).height(), 'width':$(window).width() }) .bind('click',function(){ if(!settings.modal) $.prettyPhoto.close(); }); $('a.pp_close').bind('click',function(){ $.prettyPhoto.close(); return false; }); if(settings.allow_expand){ $('a.pp_expand').bind('click',function(e){ if($(this).hasClass('pp_expand')){ $(this).removeClass('pp_expand').addClass('pp_contract'); doresize=false; }else{ $(this).removeClass('pp_contract').addClass('pp_expand'); doresize=true; }; _hideContent(function(){ $.prettyPhoto.open(); }); return false; }); } $pp_pic_holder.find('.pp_previous, .pp_nav .pp_arrow_previous').bind('click',function(){ $.prettyPhoto.changePage('previous'); $.prettyPhoto.stopSlideshow(); return false; }); $pp_pic_holder.find('.pp_next, .pp_nav .pp_arrow_next').bind('click',function(){ $.prettyPhoto.changePage('next'); $.prettyPhoto.stopSlideshow(); return false; }); _center_overlay(); }; if(!pp_alreadyInitialized&&getHashtag()){ pp_alreadyInitialized=true; hashIndex=getHashtag(); hashRel=hashIndex; hashIndex=hashIndex.substring(hashIndex.indexOf('/')+1,hashIndex.length-1); hashRel=hashRel.substring(0,hashRel.indexOf('/')); setTimeout(function(){ $("a["+pp_settings.hook+"^='"+hashRel+"']:eq("+hashIndex+")").trigger('click'); },50); } return this.unbind('click.prettyphoto').bind('click.prettyphoto',$.prettyPhoto.initialize); }; function getHashtag(){ var url=location.href; hashtag=(url.indexOf('#prettyPhoto')!==-1) ? decodeURI(url.substring(url.indexOf('#prettyPhoto')+1,url.length)):false; if(hashtag){ hashtag=hashtag.replace(/<|>/g,''); } return hashtag; }; function setHashtag(){ if(typeof theRel=='undefined') return; location.hash=theRel + '/'+rel_index+'/'; }; function clearHashtag(){ if(location.href.indexOf('#prettyPhoto')!==-1) location.hash="prettyPhoto"; } function getParam(name,url){ name=name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); var regexS="[\\?&]"+name+"=([^&#]*)"; var regex=new RegExp(regexS); var results=regex.exec(url); return(results==null) ? "":results[1]; }})(jQuery); var pp_alreadyInitialized=false; (function(e){if(typeof exports==="object"){module.exports=e(require("jquery"))}else if(typeof define==="function"&&define.amd){define(["jquery"],e)}else{e(jQuery)}})(function(e){"use strict";var t={},n=Math.max,r=Math.min;t.c={};t.c.d=e(document);t.c.t=function(e){return e.originalEvent.touches.length-1};t.o=function(){var n=this;this.o=null;this.$=null;this.i=null;this.g=null;this.v=null;this.cv=null;this.x=0;this.y=0;this.w=0;this.h=0;this.$c=null;this.c=null;this.t=0;this.isInit=false;this.fgColor=null;this.pColor=null;this.dH=null;this.cH=null;this.eH=null;this.rH=null;this.scale=1;this.relative=false;this.relativeWidth=false;this.relativeHeight=false;this.$div=null;this.run=function(){var t=function(e,t){var r;for(r in t){n.o[r]=t[r]}n._carve().init();n._configure()._draw()};if(this.$.data("kontroled"))return;this.$.data("kontroled",true);this.extend();this.o=e.extend({min:this.$.data("min")!==undefined?this.$.data("min"):0,max:this.$.data("max")!==undefined?this.$.data("max"):100,stopper:true,readOnly:this.$.data("readonly")||this.$.attr("readonly")==="readonly",cursor:this.$.data("cursor")===true&&30||this.$.data("cursor")||0,thickness:this.$.data("thickness")&&Math.max(Math.min(this.$.data("thickness"),1),.01)||.35,lineCap:this.$.data("linecap")||"butt",width:this.$.data("width")||200,height:this.$.data("height")||200,displayInput:this.$.data("displayinput")==null||this.$.data("displayinput"),displayPrevious:this.$.data("displayprevious"),fgColor:this.$.data("fgcolor")||"#87CEEB",inputColor:this.$.data("inputcolor"),font:this.$.data("font")||"Arial",fontWeight:this.$.data("font-weight")||"bold",inline:false,step:this.$.data("step")||1,rotation:this.$.data("rotation"),draw:null,change:null,cancel:null,release:null,format:function(e){return e},parse:function(e){return parseFloat(e)}},this.o);this.o.flip=this.o.rotation==="anticlockwise"||this.o.rotation==="acw";if(!this.o.inputColor){this.o.inputColor=this.o.fgColor}if(this.$.is("fieldset")){this.v={};this.i=this.$.find("input");this.i.each(function(t){var r=e(this);n.i[t]=r;n.v[t]=n.o.parse(r.val());r.bind("change blur",function(){var e={};e[t]=r.val();n.val(n._validate(e))})});this.$.find("legend").remove()}else{this.i=this.$;this.v=this.o.parse(this.$.val());this.v===""&&(this.v=this.o.min);this.$.bind("change blur",function(){n.val(n._validate(n.o.parse(n.$.val())))})}!this.o.displayInput&&this.$.hide();this.$c=e(document.createElement("canvas")).attr({width:this.o.width,height:this.o.height});this.$div=e('
    ');this.$.wrap(this.$div).before(this.$c);this.$div=this.$.parent();if(typeof G_vmlCanvasManager!=="undefined"){G_vmlCanvasManager.initElement(this.$c[0])}this.c=this.$c[0].getContext?this.$c[0].getContext("2d"):null;if(!this.c){throw{name:"CanvasNotSupportedException",message:"Canvas not supported. Please use excanvas on IE8.0.",toString:function(){return this.name+": "+this.message}}}this.scale=(window.devicePixelRatio||1)/(this.c.webkitBackingStorePixelRatio||this.c.mozBackingStorePixelRatio||this.c.msBackingStorePixelRatio||this.c.oBackingStorePixelRatio||this.c.backingStorePixelRatio||1);this.relativeWidth=this.o.width%1!==0&&this.o.width.indexOf("%");this.relativeHeight=this.o.height%1!==0&&this.o.height.indexOf("%");this.relative=this.relativeWidth||this.relativeHeight;this._carve();if(this.v instanceof Object){this.cv={};this.copy(this.v,this.cv)}else{this.cv=this.v}this.$.bind("configure",t).parent().bind("configure",t);this._listen()._configure()._xy().init();this.isInit=true;this.$.val(this.o.format(this.v));this._draw();return this};this._carve=function(){if(this.relative){var e=this.relativeWidth?this.$div.parent().width()*parseInt(this.o.width)/100:this.$div.parent().width(),t=this.relativeHeight?this.$div.parent().height()*parseInt(this.o.height)/100:this.$div.parent().height();this.w=this.h=Math.min(e,t)}else{this.w=this.o.width;this.h=this.o.height}this.$div.css({width:this.w+"px",height:this.h+"px"});this.$c.attr({width:this.w,height:this.h});if(this.scale!==1){this.$c[0].width=this.$c[0].width*this.scale;this.$c[0].height=this.$c[0].height*this.scale;this.$c.width(this.w);this.$c.height(this.h)}return this};this._draw=function(){var e=true;n.g=n.c;n.clear();n.dH&&(e=n.dH());e!==false&&n.draw()};this._touch=function(e){var r=function(e){var t=n.xy2val(e.originalEvent.touches[n.t].pageX,e.originalEvent.touches[n.t].pageY);if(t==n.cv)return;if(n.cH&&n.cH(t)===false)return;n.change(n._validate(t));n._draw()};this.t=t.c.t(e);r(e);t.c.d.bind("touchmove.k",r).bind("touchend.k",function(){t.c.d.unbind("touchmove.k touchend.k");n.val(n.cv)});return this};this._mouse=function(e){var r=function(e){var t=n.xy2val(e.pageX,e.pageY);if(t==n.cv)return;if(n.cH&&n.cH(t)===false)return;n.change(n._validate(t));n._draw()};r(e);t.c.d.bind("mousemove.k",r).bind("keyup.k",function(e){if(e.keyCode===27){t.c.d.unbind("mouseup.k mousemove.k keyup.k");if(n.eH&&n.eH()===false)return;n.cancel()}}).bind("mouseup.k",function(e){t.c.d.unbind("mousemove.k mouseup.k keyup.k");n.val(n.cv)});return this};this._xy=function(){var e=this.$c.offset();this.x=e.left;this.y=e.top;return this};this._listen=function(){if(!this.o.readOnly){this.$c.bind("mousedown",function(e){e.preventDefault();n._xy()._mouse(e)}).bind("touchstart",function(e){e.preventDefault();n._xy()._touch(e)});this.listen()}else{this.$.attr("readonly","readonly")}if(this.relative){e(window).resize(e.debounce(50,function(){n._carve().init();n._draw()}))}return this};this._configure=function(){if(this.o.draw)this.dH=this.o.draw;if(this.o.change)this.cH=this.o.change;if(this.o.cancel)this.eH=this.o.cancel;if(this.o.release)this.rH=this.o.release;if(this.o.displayPrevious){this.pColor=this.h2rgba(this.o.fgColor,"0.4");this.fgColor=this.h2rgba(this.o.fgColor,"0.6")}else{this.fgColor=this.o.fgColor}return this};this._clear=function(){this.$c[0].width=this.$c[0].width};this._validate=function(e){var t=~~((e<0?-.5:.5)+e/this.o.step)*this.o.step;return Math.round(t*100)/100};this.listen=function(){};this.extend=function(){};this.init=function(){};this.change=function(e){};this.val=function(e){};this.xy2val=function(e,t){};this.draw=function(){};this.clear=function(){this._clear()};this.h2rgba=function(e,t){var n;e=e.substring(1,7);n=[parseInt(e.substring(0,2),16),parseInt(e.substring(2,4),16),parseInt(e.substring(4,6),16)];return"rgba("+n[0]+","+n[1]+","+n[2]+","+t+")"};this.copy=function(e,t){for(var n in e){t[n]=e[n]}}};t.Dial=function(){t.o.call(this);this.startAngle=null;this.xy=null;this.radius=null;this.lineWidth=null;this.cursorExt=null;this.w2=null;this.PI2=2*Math.PI;this.extend=function(){this.o=e.extend({bgColor:this.$.data("bgcolor")||"#EEEEEE",angleOffset:this.$.data("angleoffset")||0,angleArc:this.$.data("anglearc")||360,inline:true},this.o)};this.val=function(e,t){if(null!=e){e=this.o.parse(e);if(t!==false&&e!=this.v&&this.rH&&this.rH(e)===false){return}this.cv=this.o.stopper?n(r(e,this.o.max),this.o.min):e;this.v=this.cv;this.$.val(this.o.format(this.v));this._draw()}else{return this.v}};this.xy2val=function(e,t){var i,s;i=Math.atan2(e-(this.x+this.w2),-(t-this.y-this.w2))-this.angleOffset;if(this.o.flip){i=this.angleArc-i-this.PI2}if(this.angleArc!=this.PI2&&i<0&&i>-.5){i=0}else if(i<0){i+=this.PI2}s=i*(this.o.max-this.o.min)/this.angleArc+this.o.min;this.o.stopper&&(s=n(r(s,this.o.max),this.o.min));return s};this.listen=function(){var t=this,i,s,o=function(e){e.preventDefault();var o=e.originalEvent,u=o.detail||o.wheelDeltaX,a=o.detail||o.wheelDeltaY,f=t._validate(t.o.parse(t.$.val()))+(u>0||a>0?t.o.step:u<0||a<0?-t.o.step:0);f=n(r(f,t.o.max),t.o.min);t.val(f,false);if(t.rH){clearTimeout(i);i=setTimeout(function(){t.rH(f);i=null},100);if(!s){s=setTimeout(function(){if(i)t.rH(f);s=null},200)}}},u,a,f=1,l={37:-t.o.step,38:t.o.step,39:t.o.step,40:-t.o.step};this.$.bind("keydown",function(i){var s=i.keyCode;if(s>=96&&s<=105){s=i.keyCode=s-48}u=parseInt(String.fromCharCode(s));if(isNaN(u)){s!==13&&s!==8&&s!==9&&s!==189&&(s!==190||t.$.val().match(/\./))&&i.preventDefault();if(e.inArray(s,[37,38,39,40])>-1){i.preventDefault();var o=t.o.parse(t.$.val())+l[s]*f;t.o.stopper&&(o=n(r(o,t.o.max),t.o.min));t.change(t._validate(o));t._draw();a=window.setTimeout(function(){f*=2},30)}}}).bind("keyup",function(e){if(isNaN(u)){if(a){window.clearTimeout(a);a=null;f=1;t.val(t.$.val())}}else{t.$.val()>t.o.max&&t.$.val(t.o.max)||t.$.val()this.o.max){this.v=this.o.min}this.$.val(this.v);this.w2=this.w/2;this.cursorExt=this.o.cursor/100;this.xy=this.w2*this.scale;this.lineWidth=this.xy*this.o.thickness;this.lineCap=this.o.lineCap;this.radius=this.xy-this.lineWidth/2;this.o.angleOffset&&(this.o.angleOffset=isNaN(this.o.angleOffset)?0:this.o.angleOffset);this.o.angleArc&&(this.o.angleArc=isNaN(this.o.angleArc)?this.PI2:this.o.angleArc);this.angleOffset=this.o.angleOffset*Math.PI/180;this.angleArc=this.o.angleArc*Math.PI/180;this.startAngle=1.5*Math.PI+this.angleOffset;this.endAngle=1.5*Math.PI+this.angleOffset+this.angleArc;var e=n(String(Math.abs(this.o.max)).length,String(Math.abs(this.o.min)).length,2)+2;this.o.displayInput&&this.i.css({width:(this.w/2+4>>0)+"px",height:(this.w/3>>0)+"px",position:"absolute","vertical-align":"middle","margin-top":(this.w/3>>0)+"px","margin-left":"-"+(this.w*3/4+2>>0)+"px",border:0,background:"none",font:this.o.fontWeight+" "+(this.w/e>>0)+"px "+this.o.font,"text-align":"center",color:this.o.inputColor||this.o.fgColor,padding:"0px","-webkit-appearance":"none"})||this.i.css({width:"0px",visibility:"hidden"})};this.change=function(e){this.cv=e;this.$.val(this.o.format(e))};this.angle=function(e){return(e-this.o.min)*this.angleArc/(this.o.max-this.o.min)};this.arc=function(e){var t,n;e=this.angle(e);if(this.o.flip){t=this.endAngle+1e-5;n=t-e-1e-5}else{t=this.startAngle-1e-5;n=t+e+1e-5}this.o.cursor&&(t=n-this.cursorExt)&&(n=n+this.cursorExt);return{s:t,e:n,d:this.o.flip&&!this.o.cursor}};this.draw=function(){var e=this.g,t=this.arc(this.cv),n,r=1;e.lineWidth=this.lineWidth;e.lineCap=this.lineCap;if(this.o.bgColor!=="none"){e.beginPath();e.strokeStyle=this.o.bgColor;e.arc(this.xy,this.xy,this.radius,this.endAngle-1e-5,this.startAngle+1e-5,true);e.stroke()}if(this.o.displayPrevious){n=this.arc(this.v);e.beginPath();e.strokeStyle=this.pColor;e.arc(this.xy,this.xy,this.radius,n.s,n.e,n.d);e.stroke();r=this.cv==this.v}e.beginPath();e.strokeStyle=r?this.o.fgColor:this.fgColor;e.arc(this.xy,this.xy,this.radius,t.s,t.e,t.d);e.stroke()};this.cancel=function(){this.val(this.v)}};e.fn.dial=e.fn.knob=function(n){return this.each(function(){var r=new t.Dial;r.o=n;r.$=e(this);r.run()}).parent()}}); (function(b,c){var $=b.jQuery||b.Cowboy||(b.Cowboy={}),a;$.throttle=a=function(e,f,j,i){var h,d=0;if(typeof f!=="boolean"){i=j;j=f;f=c}function g(){var o=this,m=+new Date()-d,n=arguments;function l(){d=+new Date();j.apply(o,n)}function k(){h=c}if(i&&!h){l()}h&&clearTimeout(h);if(i===c&&m>e){l()}else{if(f!==true){h=setTimeout(i?k:l,i===c?e-m:e)}}}if($.guid){g.guid=j.guid=j.guid||$.guid++}return g};$.debounce=function(d,e,f){return f===c?a(d,e,false):a(d,f,e!==false)}})(this); (function (c){ c.fn.ClassyCountdown=function (k, r){ function l(){ e=Math.floor(d / 86400); f=Math.floor(d % 86400 / 3600); g=Math.floor(d % 86400 % 3600 / 60); h=Math.floor(d % 86400 % 3600 % 60 % 60) } function m(){ d--; l(); 0 >=d&&(n||(n = !0, b.onEndCallback()), h=g = f=e = 0); a.find(".ClassyCountdown-days input").val(365 - e).trigger("change"); a.find(".ClassyCountdown-hours input").val(24 - f).trigger("change"); a.find(".ClassyCountdown-minutes input").val(60 - g).trigger("change"); a.find(".ClassyCountdown-seconds input").val(60 - h).trigger("change"); a.find(".ClassyCountdown-days .ClassyCountdown-value > div").html(e); a.find(".ClassyCountdown-hours .ClassyCountdown-value > div").html(f); a.find(".ClassyCountdown-minutes .ClassyCountdown-value > div").html(g); a.find(".ClassyCountdown-seconds .ClassyCountdown-value > div").html(h) } function p(){ a.find(".ClassyCountdown-wrapper > div").each(function (){ c(this).css("height", c(this).width() + "px") }); b.style.textResponsive&&a.find(".ClassyCountdown-value").css("font-size", Math.floor(a.find("> div").eq(0).width() * b.style.textResponsive / 10) + "px"); a.find(".ClassyCountdown-value").each(function (){ c(this).css("margin-top", Math.floor(0 - parseInt(c(this).height()) / 2) + "px") }); a.find(".ClassyCountdown-days input").trigger("change"); a.find(".ClassyCountdown-hours input").trigger("change"); a.find(".ClassyCountdown-minutes input").trigger("change"); a.find(".ClassyCountdown-seconds input").trigger("change") } function q(a){ switch (a){ case "flat-colors": return { labels:!0, style:{ element:"", textResponsive : .5, days:{ gauge:{ thickness : .01, bgColor:"rgba(0,0,0,0.05)", fgColor:"#1abc9c" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;" }, hours:{ gauge:{ thickness : .01, bgColor:"rgba(0,0,0,0.05)", fgColor:"#2980b9" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;" }, minutes:{ gauge:{ thickness : .01, bgColor:"rgba(0,0,0,0.05)", fgColor:"#8e44ad" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;" }, seconds:{ gauge:{ thickness : .01, bgColor:"rgba(0,0,0,0.05)", fgColor:"#f39c12" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;" }} }; case "flat-colors-wide": return { labels:!0, style:{ element:"", textResponsive : .5, days:{ gauge:{ thickness : .03, bgColor:"rgba(0,0,0,0.05)", fgColor:"#1abc9c" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;" }, hours:{ gauge:{ thickness : .03, bgColor:"rgba(0,0,0,0.05)", fgColor:"#2980b9" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;" }, minutes:{ gauge:{ thickness : .03, bgColor:"rgba(0,0,0,0.05)", fgColor:"#8e44ad" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;" }, seconds:{ gauge:{ thickness : .03, bgColor:"rgba(0,0,0,0.05)", fgColor:"#f39c12" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;" }} }; case "flat-colors-very-wide": return { labels:!0, style:{ element:"", textResponsive : .5, days:{ gauge:{ thickness : .12, bgColor:"rgba(0,0,0,0.05)", fgColor:"#1abc9c" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;" }, hours:{ gauge:{ thickness : .12, bgColor:"rgba(0,0,0,0.05)", fgColor:"#2980b9" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;" }, minutes:{ gauge:{ thickness : .12, bgColor:"rgba(0,0,0,0.05)", fgColor:"#8e44ad" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;" }, seconds:{ gauge:{ thickness : .12, bgColor:"rgba(0,0,0,0.05)", fgColor:"#f39c12" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;" }} }; case "flat-colors-black": return { labels:!0, style:{ element:"", textResponsive : .5, days:{ gauge:{ thickness : .25, bgColor:"rgba(0,0,0,0.05)", fgColor:"#1abc9c", lineCap:"round" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;" }, hours:{ gauge:{ thickness : .25, bgColor:"rgba(0,0,0,0.05)", fgColor:"#2980b9", lineCap:"round" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;" }, minutes:{ gauge:{ thickness : .25, bgColor:"rgba(0,0,0,0.05)", fgColor:"#8e44ad", lineCap:"round" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;" }, seconds:{ gauge:{ thickness : .25, bgColor:"rgba(0,0,0,0.05)", fgColor:"#f39c12", lineCap:"round" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;" }} }; case "black": return { labels:!0, style:{ element:"", textResponsive : .5, days:{ gauge:{ thickness : .01, bgColor:"rgba(0,0,0,0.05)", fgColor:"#222" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;" }, hours:{ gauge:{ thickness : .01, bgColor:"rgba(0,0,0,0.05)", fgColor:"#222" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;" }, minutes:{ gauge:{ thickness : .01, bgColor:"rgba(0,0,0,0.05)", fgColor:"#222" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;" }, seconds:{ gauge:{ thickness : .01, bgColor:"rgba(0,0,0,0.05)", fgColor:"#222" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;" }} }; case "black-wide": return { labels:!0, style:{ element:"", textResponsive : .5, days:{ gauge:{ thickness : .03, bgColor:"rgba(0,0,0,0.05)", fgColor:"#222" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;" }, hours:{ gauge:{ thickness : .03, bgColor:"rgba(0,0,0,0.05)", fgColor:"#222" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;" }, minutes:{ gauge:{ thickness : .03, bgColor:"rgba(0,0,0,0.05)", fgColor:"#222" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;" }, seconds:{ gauge:{ thickness : .03, bgColor:"rgba(0,0,0,0.05)", fgColor:"#222" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;" }} }; case "black-very-wide": return { labels:!0, style:{ element:"", textResponsive : .5, days:{ gauge:{ thickness : .17, bgColor:"rgba(0,0,0,0.05)", fgColor:"#222" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;" }, hours:{ gauge:{ thickness : .17, bgColor:"rgba(0,0,0,0.05)", fgColor:"#222" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;" }, minutes:{ gauge:{ thickness : .17, bgColor:"rgba(0,0,0,0.05)", fgColor:"#222" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;" }, seconds:{ gauge:{ thickness : .17, bgColor:"rgba(0,0,0,0.05)", fgColor:"#222" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;" }} }; case "black-black": return { labels:!0, style:{ element:"", textResponsive : .5, days:{ gauge:{ thickness : .25, bgColor:"rgba(0,0,0,0.05)", fgColor:"#222", lineCap:"round" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;" }, hours:{ gauge:{ thickness : .25, bgColor:"rgba(0,0,0,0.05)", fgColor:"#222", lineCap:"round" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;" }, minutes:{ gauge:{ thickness : .25, bgColor:"rgba(0,0,0,0.05)", fgColor:"#222", lineCap:"round" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;" }, seconds:{ gauge:{ thickness : .25, bgColor:"rgba(0,0,0,0.05)", fgColor:"#222", lineCap:"round" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;" }} }; case "white": return { labels:!0, style:{ element:"", textResponsive : .5, days:{ gauge:{ thickness : .03, bgColor:"rgba(255,255,255,0.05)", fgColor:"#fff" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#fff;" }, hours:{ gauge:{ thickness : .03, bgColor:"rgba(255,255,255,0.05)", fgColor:"#fff" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#fff;" }, minutes:{ gauge:{ thickness : .03, bgColor:"rgba(255,255,255,0.05)", fgColor:"#fff" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#fff;" }, seconds:{ gauge:{ thickness : .03, bgColor:"rgba(255,255,255,0.05)", fgColor:"#fff" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#fff;" }} }; case "white-wide": return { labels:!0, style:{ element:"", textResponsive : .5, days:{ gauge:{ thickness : .06, bgColor:"rgba(255,255,255,0.05)", fgColor:"#fff" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#fff;" }, hours:{ gauge:{ thickness : .06, bgColor:"rgba(255,255,255,0.05)", fgColor:"#fff" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#fff;" }, minutes:{ gauge:{ thickness : .06, bgColor:"rgba(255,255,255,0.05)", fgColor:"#fff" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#fff;" }, seconds:{ gauge:{ thickness : .06, bgColor:"rgba(255,255,255,0.05)", fgColor:"#fff" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#fff;" }} }; case "white-very-wide": return { labels:!0, style:{ element:"", textResponsive : .5, days:{ gauge:{ thickness : .16, bgColor:"rgba(255,255,255,0.05)", fgColor:"#fff" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#fff;" }, hours:{ gauge:{ thickness : .16, bgColor:"rgba(255,255,255,0.05)", fgColor:"#fff" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#fff;" }, minutes:{ gauge:{ thickness : .16, bgColor:"rgba(255,255,255,0.05)", fgColor:"#fff" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#fff;" }, seconds:{ gauge:{ thickness : .16, bgColor:"rgba(255,255,255,0.05)", fgColor:"#fff" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#fff;" }} }; case "white-black": return { labels:!0, style:{ element:"", textResponsive : .5, days:{ gauge:{ thickness : .25, bgColor:"rgba(255,255,255,0.05)", fgColor:"#fff", lineCap:"round" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#fff;" }, hours:{ gauge:{ thickness : .25, bgColor:"rgba(255,255,255,0.05)", fgColor:"#fff", lineCap:"round" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#fff;" }, minutes:{ gauge:{ thickness : .25, bgColor:"rgba(255,255,255,0.05)", fgColor:"#fff", lineCap:"round" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#fff;" }, seconds:{ gauge:{ thickness : .25, bgColor:"rgba(255,255,255,0.05)", fgColor:"#fff", lineCap:"round" }, textCSS:"font-family:'Open Sans';font-weight:300;color:#fff;" }} }} } var a=c(this), e, f, g, h, d, n = !1, b={ end:void 0, now:c.now(), labels:!0, labelsOptions:{ lang:{ days:"Days", hours:"Hours", minutes:"Minutes", seconds:"Seconds" }, style:"font-size: 0.5em;" }, style:{ element:"", labels:!1, textResponsive : .5, days:{ gauge:{ thickness : .02, bgColor:"rgba(0, 0, 0, 0)", fgColor:"rgba(0, 0, 0, 1)", lineCap:"butt" }, textCSS:"" }, hours:{ gauge:{ thickness : .02, bgColor:"rgba(0, 0, 0, 0)", fgColor:"rgba(0, 0, 0, 1)", lineCap:"butt" }, textCSS:"" }, minutes:{ gauge:{ thickness : .02, bgColor:"rgba(0, 0, 0, 0)", fgColor:"rgba(0, 0, 0, 1)", lineCap:"butt" }, textCSS:"" }, seconds:{ gauge:{ thickness : .02, bgColor:"rgba(0, 0, 0, 0)", fgColor:"rgba(0, 0, 0, 1)", lineCap:"butt" }, textCSS:"" }}, onEndCallback:function (){}}; k.theme&&(b=c.extend(!0, b, q(k.theme))); b=c.extend(!0, b, k); (function (){ a.append('
    '); a.find(".ClassyCountdown-days input").knob(c.extend({ width:"100%", displayInput:!1, readOnly:!0, max:365 }, b.style.days.gauge)); a.find(".ClassyCountdown-hours input").knob(c.extend({ width:"100%", displayInput:!1, readOnly:!0, max:24 }, b.style.hours.gauge)); a.find(".ClassyCountdown-minutes input").knob(c.extend({ width:"100%", displayInput:!1, readOnly:!0, max:60 }, b.style.minutes.gauge)); a.find(".ClassyCountdown-seconds input").knob(c.extend({ width:"100%", displayInput:!1, readOnly:!0, max:60 }, b.style.seconds.gauge)); a.find(".ClassyCountdown-wrapper > div").attr("style", b.style.element); a.find(".ClassyCountdown-days .ClassyCountdown-value").attr("style", b.style.days.textCSS); a.find(".ClassyCountdown-hours .ClassyCountdown-value").attr("style", b.style.hours.textCSS); a.find(".ClassyCountdown-minutes .ClassyCountdown-value").attr("style", b.style.minutes.textCSS); a.find(".ClassyCountdown-seconds .ClassyCountdown-value").attr("style", b.style.seconds.textCSS); a.find(".ClassyCountdown-value").each(function (){ c(this).css("margin-top", Math.floor(0 - parseInt(c(this).height()) / 2) + "px") }); b.labels&&(a.find(".ClassyCountdown-days .ClassyCountdown-value > span").html(b.labelsOptions.lang.days), a.find(".ClassyCountdown-hours .ClassyCountdown-value > span").html(b.labelsOptions.lang.hours), a.find(".ClassyCountdown-minutes .ClassyCountdown-value > span").html(b.labelsOptions.lang.minutes), a.find(".ClassyCountdown-seconds .ClassyCountdown-value > span").html(b.labelsOptions.lang.seconds), a.find(".ClassyCountdown-value > span").attr("style", b.labelsOptions.style)); d=b.end - b.now; l() })(); m(); setInterval(m, 1E3); (function (){ a.find(".ClassyCountdown-wrapper > div").each(function (){ c(this).css("height", c(this).width() + "px") }); b.style.textResponsive&&(a.find(".ClassyCountdown-value").css("font-size", Math.floor(a.find("> div").eq(0).width() * b.style.textResponsive / 10) + "px"), a.find(".ClassyCountdown-value").each(function (){ c(this).css("margin-top", Math.floor(0 - parseInt(c(this).height()) / 2) + "px") })); c(window).trigger("resize"); c(window).resize(c.throttle(50, p)) })() }})(jQuery); (function (module){ if(typeof define==='function'&&define.amd){ define(['jquery'], module); }else{ module(jQuery); }})(function(jQuery, undefined){ var threshold=6, add=jQuery.event.add, remove=jQuery.event.remove, trigger=function(node, type, data){ jQuery.event.trigger(type, data, node); }, requestFrame=(function(){ return ( window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(fn, element){ return window.setTimeout(function(){ fn(); }, 25); } ); })(), ignoreTags={ textarea: true, input: true, select: true, button: true }, mouseevents={ move: 'mousemove', cancel: 'mouseup dragstart', end: 'mouseup' }, touchevents={ move: 'touchmove', cancel: 'touchend', end: 'touchend' }; function Timer(fn){ var callback=fn, active=false, running=false; function trigger(time){ if(active){ callback(); requestFrame(trigger); running=true; active=false; }else{ running=false; }} this.kick=function(fn){ active=true; if(!running){ trigger(); }}; this.end=function(fn){ var cb=callback; if(!fn){ return; } if(!running){ fn(); }else{ callback=active ? function(){ cb(); fn(); } : fn ; active=true; }};} function returnTrue(){ return true; } function returnFalse(){ return false; } function preventDefault(e){ e.preventDefault(); } function preventIgnoreTags(e){ if(ignoreTags[ e.target.tagName.toLowerCase() ]){ return; } e.preventDefault(); } function isLeftButton(e){ return (e.which===1&&!e.ctrlKey&&!e.altKey); } function identifiedTouch(touchList, id){ var i, l; if(touchList.identifiedTouch){ return touchList.identifiedTouch(id); } i=-1; l=touchList.length; while (++i < l){ if(touchList[i].identifier===id){ return touchList[i]; }} } function changedTouch(e, event){ var touch=identifiedTouch(e.changedTouches, event.identifier); if(!touch){ return; } if(touch.pageX===event.pageX&&touch.pageY===event.pageY){ return; } return touch; } function mousedown(e){ var data; if(!isLeftButton(e)){ return; } data={ target: e.target, startX: e.pageX, startY: e.pageY, timeStamp: e.timeStamp }; add(document, mouseevents.move, mousemove, data); add(document, mouseevents.cancel, mouseend, data); } function mousemove(e){ var data=e.data; checkThreshold(e, data, e, removeMouse); } function mouseend(e){ removeMouse(); } function removeMouse(){ remove(document, mouseevents.move, mousemove); remove(document, mouseevents.cancel, mouseend); } function touchstart(e){ var touch, template; if(ignoreTags[ e.target.tagName.toLowerCase() ]){ return; } touch=e.changedTouches[0]; template={ target: touch.target, startX: touch.pageX, startY: touch.pageY, timeStamp: e.timeStamp, identifier: touch.identifier }; add(document, touchevents.move + '.' + touch.identifier, touchmove, template); add(document, touchevents.cancel + '.' + touch.identifier, touchend, template); } function touchmove(e){ var data=e.data, touch=changedTouch(e, data); if(!touch){ return; } checkThreshold(e, data, touch, removeTouch); } function touchend(e){ var template=e.data, touch=identifiedTouch(e.changedTouches, template.identifier); if(!touch){ return; } removeTouch(template.identifier); } function removeTouch(identifier){ remove(document, '.' + identifier, touchmove); remove(document, '.' + identifier, touchend); } function checkThreshold(e, template, touch, fn){ var distX=touch.pageX - template.startX, distY=touch.pageY - template.startY; if((distX * distX) + (distY * distY) < (threshold * threshold)){ return; } triggerStart(e, template, touch, distX, distY, fn); } function handled(){ this._handled=returnTrue; return false; } function flagAsHandled(e){ e._handled(); } function triggerStart(e, template, touch, distX, distY, fn){ var node=template.target, touches, time; touches=e.targetTouches; time=e.timeStamp - template.timeStamp; template.type='movestart'; template.distX=distX; template.distY=distY; template.deltaX=distX; template.deltaY=distY; template.pageX=touch.pageX; template.pageY=touch.pageY; template.velocityX=distX / time; template.velocityY=distY / time; template.targetTouches=touches; template.finger=touches ? touches.length : 1 ; template._handled=handled; template._preventTouchmoveDefault=function(){ e.preventDefault(); }; trigger(template.target, template); fn(template.identifier); } function activeMousemove(e){ var timer=e.data.timer; e.data.touch=e; e.data.timeStamp=e.timeStamp; timer.kick(); } function activeMouseend(e){ var event=e.data.event, timer=e.data.timer; removeActiveMouse(); endEvent(event, timer, function(){ setTimeout(function(){ remove(event.target, 'click', returnFalse); }, 0); }); } function removeActiveMouse(event){ remove(document, mouseevents.move, activeMousemove); remove(document, mouseevents.end, activeMouseend); } function activeTouchmove(e){ var event=e.data.event, timer=e.data.timer, touch=changedTouch(e, event); if(!touch){ return; } e.preventDefault(); event.targetTouches=e.targetTouches; e.data.touch=touch; e.data.timeStamp=e.timeStamp; timer.kick(); } function activeTouchend(e){ var event=e.data.event, timer=e.data.timer, touch=identifiedTouch(e.changedTouches, event.identifier); if(!touch){ return; } removeActiveTouch(event); endEvent(event, timer); } function removeActiveTouch(event){ remove(document, '.' + event.identifier, activeTouchmove); remove(document, '.' + event.identifier, activeTouchend); } function updateEvent(event, touch, timeStamp, timer){ var time=timeStamp - event.timeStamp; event.type='move'; event.distX=touch.pageX - event.startX; event.distY=touch.pageY - event.startY; event.deltaX=touch.pageX - event.pageX; event.deltaY=touch.pageY - event.pageY; event.velocityX=0.3 * event.velocityX + 0.7 * event.deltaX / time; event.velocityY=0.3 * event.velocityY + 0.7 * event.deltaY / time; event.pageX=touch.pageX; event.pageY=touch.pageY; } function endEvent(event, timer, fn){ timer.end(function(){ event.type='moveend'; trigger(event.target, event); return fn&&fn(); }); } function setup(data, namespaces, eventHandle){ add(this, 'movestart.move', flagAsHandled); return true; } function teardown(namespaces){ remove(this, 'dragstart drag', preventDefault); remove(this, 'mousedown touchstart', preventIgnoreTags); remove(this, 'movestart', flagAsHandled); return true; } function addMethod(handleObj){ if(handleObj.namespace==="move"||handleObj.namespace==="moveend"){ return; } add(this, 'dragstart.' + handleObj.guid + ' drag.' + handleObj.guid, preventDefault, undefined, handleObj.selector); add(this, 'mousedown.' + handleObj.guid, preventIgnoreTags, undefined, handleObj.selector); } function removeMethod(handleObj){ if(handleObj.namespace==="move"||handleObj.namespace==="moveend"){ return; } remove(this, 'dragstart.' + handleObj.guid + ' drag.' + handleObj.guid); remove(this, 'mousedown.' + handleObj.guid); } jQuery.event.special.movestart={ setup: setup, teardown: teardown, add: addMethod, remove: removeMethod, _default: function(e){ var event, data; if(!e._handled()){ return; } function update(time){ updateEvent(event, data.touch, data.timeStamp); trigger(e.target, event); } event={ target: e.target, startX: e.startX, startY: e.startY, pageX: e.pageX, pageY: e.pageY, distX: e.distX, distY: e.distY, deltaX: e.deltaX, deltaY: e.deltaY, velocityX: e.velocityX, velocityY: e.velocityY, timeStamp: e.timeStamp, identifier: e.identifier, targetTouches: e.targetTouches, finger: e.finger }; data={ event: event, timer: new Timer(update), touch: undefined, timeStamp: undefined }; if(e.identifier===undefined){ add(e.target, 'click', returnFalse); add(document, mouseevents.move, activeMousemove, data); add(document, mouseevents.end, activeMouseend, data); }else{ e._preventTouchmoveDefault(); add(document, touchevents.move + '.' + e.identifier, activeTouchmove, data); add(document, touchevents.end + '.' + e.identifier, activeTouchend, data); }} }; jQuery.event.special.move={ setup: function(){ add(this, 'movestart.move', jQuery.noop); }, teardown: function(){ remove(this, 'movestart.move', jQuery.noop); }}; jQuery.event.special.moveend={ setup: function(){ add(this, 'movestart.moveend', jQuery.noop); }, teardown: function(){ remove(this, 'movestart.moveend', jQuery.noop); }}; add(document, 'mousedown.move', mousedown); add(document, 'touchstart.move', touchstart); if(typeof Array.prototype.indexOf==='function'){ (function(jQuery, undefined){ var props=["changedTouches", "targetTouches"], l=props.length; while (l--){ if(jQuery.event.props.indexOf(props[l])===-1){ jQuery.event.props.push(props[l]); }} })(jQuery); };}); (function($){ $.fn.twentytwenty=function(options){ var options=$.extend({default_offset_pct: 0.5, orientation: 'horizontal'}, options); return this.each(function(){ var sliderPct=options.default_offset_pct; var container=$(this); var sliderOrientation=options.orientation; var beforeDirection=(sliderOrientation==='vertical') ? 'down':'left'; var afterDirection=(sliderOrientation==='vertical') ? 'up':'right'; container.wrap("
    "); container.append("
    "); var beforeImg=container.find("img:first"); var afterImg=container.find("img:last"); container.append("
    "); var slider=container.find(".twentytwenty-handle"); slider.append(""); slider.append(""); container.addClass("twentytwenty-container"); beforeImg.addClass("twentytwenty-before"); afterImg.addClass("twentytwenty-after"); var overlay=container.find(".twentytwenty-overlay"); overlay.append("
    "); overlay.append("
    "); var calcOffset=function(dimensionPct){ var w=beforeImg.width(); var h=beforeImg.height(); return { w: w+"px", h: h+"px", cw: (dimensionPct*w)+"px", ch: (dimensionPct*h)+"px" };}; var adjustContainer=function(offset){ if(sliderOrientation==='vertical'){ beforeImg.css("clip", "rect(0,"+offset.w+","+offset.ch+",0)"); }else{ beforeImg.css("clip", "rect(0,"+offset.cw+","+offset.h+",0)"); } container.css("height", offset.h); }; var adjustSlider=function(pct){ var offset=calcOffset(pct); slider.css((sliderOrientation==="vertical") ? "top":"left", (sliderOrientation==="vertical") ? offset.ch:offset.cw); adjustContainer(offset); } $(window).on("resize.twentytwenty", function(e){ adjustSlider(sliderPct); }); var offsetX=0; var imgWidth=0; slider.on("movestart", function(e){ if(((e.distX > e.distY&&e.distX < -e.distY)||(e.distX < e.distY&&e.distX > -e.distY))&&sliderOrientation!=='vertical'){ e.preventDefault(); } else if(((e.distX < e.distY&&e.distX < -e.distY)||(e.distX > e.distY&&e.distX > -e.distY))&&sliderOrientation==='vertical'){ e.preventDefault(); } container.addClass("active"); offsetX=container.offset().left; offsetY=container.offset().top; imgWidth=beforeImg.width(); imgHeight=beforeImg.height(); }); slider.on("moveend", function(e){ container.removeClass("active"); }); slider.on("move", function(e){ if(container.hasClass("active")){ sliderPct=(sliderOrientation==='vertical') ? (e.pageY-offsetY)/imgHeight:(e.pageX-offsetX)/imgWidth; if(sliderPct < 0){ sliderPct=0; } if(sliderPct > 1){ sliderPct=1; } adjustSlider(sliderPct); }}); container.find("img").on("mousedown", function(event){ event.preventDefault(); }); $(window).trigger("resize.twentytwenty"); }); };})(jQuery); ;(function($, window, document, undefined){ var isTouch='ontouchstart' in window, eStart=isTouch ? 'touchstart':'mousedown', eMove=isTouch ? 'touchmove':'mousemove', eEnd=isTouch ? 'touchend':'mouseup', eCancel=isTouch ? 'touchcancel':'mouseup', secondsToTime=function(secs){ var hours=Math.floor(secs / 3600), minutes=Math.floor(secs % 3600 / 60), seconds=Math.ceil(secs % 3600 % 60); return(hours==0 ? '':hours > 0&&hours.toString().length < 2 ? '0'+hours+':':hours+':') +(minutes.toString().length < 2 ? '0'+minutes:minutes) + ':' +(seconds.toString().length < 2 ? '0'+seconds:seconds); }, canPlayType=function(file){ var audioElement=document.createElement('audio'); return !!(audioElement.canPlayType&&audioElement.canPlayType('audio/' + file.split('.').pop().toLowerCase() + ';').replace(/no/, '')); }; $.fn.audioPlayer=function(params){ var params=$.extend({ classPrefix: 'audioplayer', strPlay: 'Play', strPause: 'Pause', strVolume: 'Volume',strControls:'',strStyle:'' }, params), cssClass={}, cssClassSub = { playPause: 'playpause', playing: 'playing', time: 'time', timeCurrent: 'time-current', timeDuration: 'time-duration', bar: 'bar', barLoaded: 'bar-loaded', barPlayed: 'bar-played', volume: 'volume', volumeButton: 'volume-button', volumeAdjust: 'volume-adjust', noVolume: 'novolume', mute: 'mute', mini: 'mini' }; for(var subName in cssClassSub) cssClass[ subName ]=params.classPrefix + '-' + cssClassSub[ subName ]; this.each(function(){ if($(this).prop('tagName').toLowerCase()!='audio') return false; var $this=$(this), audioFile=$this.attr('src'), isAutoPlay=$this.get(0).getAttribute('data-autoplay'), isAutoPlay=isAutoPlay==='autoplay' ? true:false, isLoop=$this.get(0).getAttribute('data-loop'), isLoop=isLoop==='loop' ? true:false, isMute=$this.get(0).getAttribute('data-mute'), isMute=isMute==='mute' ? true:false, isSupport=false; if(typeof audioFile==='undefined'){ $this.find('source').each(function(){ audioFile=$(this).attr('src'); if(typeof audioFile!=='undefined'&&canPlayType(audioFile)){ isSupport=true; return false; }}); } else if(canPlayType(audioFile)) isSupport=true; var thePlayer=$('
    ' +(isSupport ? $('
    ').append($this.eq(0).clone()).html():'') + '
    '), theAudio=isSupport ? thePlayer.find('audio'):thePlayer.find('embed'), theAudio=theAudio.get(0); if(isSupport){ thePlayer.find('audio').css({ 'width': 0, 'height': 0, 'visibility': 'hidden' }); thePlayer.append('
    '); var theBar=thePlayer.find('.' + cssClass.bar), barPlayed=thePlayer.find('.' + cssClass.barPlayed), barLoaded=thePlayer.find('.' + cssClass.barLoaded), timeCurrent=thePlayer.find('.' + cssClass.timeCurrent), timeDuration=thePlayer.find('.' + cssClass.timeDuration), volumeButton=thePlayer.find('.' + cssClass.volumeButton), volumeAdjuster=thePlayer.find('.' + cssClass.volumeAdjust + ' > div'), volumeDefault=0, adjustCurrentTime=function(e){ theRealEvent=isTouch ? e.originalEvent.touches[ 0 ]:e; theAudio.currentTime=Math.round(( theAudio.duration *(theRealEvent.pageX - theBar.offset().left)) / theBar.width()); }, adjustVolume=function(e){ theRealEvent=isTouch ? e.originalEvent.touches[ 0 ]:e; theAudio.volume=1 - Math.abs(((volumeAdjuster.offset().left + volumeAdjuster.width()) - theRealEvent.pageX) / volumeAdjuster.width()); }, updateLoadBar=setInterval(function(){ if(theAudio.buffered.length > 0){ if(theAudio.duration > 0){ barLoaded.width(( theAudio.buffered.end(0) / theAudio.duration) * 100 + '%'); } if(theAudio.buffered.end(0) >=theAudio.duration){ clearInterval(updateLoadBar); }} }, 100); var volumeTestDefault=theAudio.volume, volumeTestValue=theAudio.volume=0.111; if(Math.round(theAudio.volume * 1000) / 1000==volumeTestValue) theAudio.volume=volumeTestDefault; else thePlayer.addClass(cssClass.noVolume); timeDuration.html('…'); timeCurrent.text(secondsToTime(0)); theAudio.addEventListener('loadeddata', function(){ timeDuration.text(secondsToTime(theAudio.duration)); volumeAdjuster.find('div').width(theAudio.volume * 100 + '%'); volumeDefault=theAudio.volume; if(isAutoPlay){isSupport ? theAudio.play():theAudio.Play();thePlayer.addClass(cssClass.playing);} if(isMute){ thePlayer.addClass(cssClass.mute); volumeDefault=theAudio.volume; theAudio.volume=0; volumeAdjuster.find('div').width(theAudio.volume * 100 + '%'); }}); theAudio.addEventListener('timeupdate', function(){ timeCurrent.text(secondsToTime(theAudio.currentTime)); barPlayed.width(( theAudio.currentTime / theAudio.duration) * 100 + '%'); }); theAudio.addEventListener('volumechange', function(){ volumeAdjuster.find('div').width(theAudio.volume * 100 + '%'); if(theAudio.volume > 0&&thePlayer.hasClass(cssClass.mute)) thePlayer.removeClass(cssClass.mute); if(theAudio.volume <=0&&!thePlayer.hasClass(cssClass.mute)) thePlayer.addClass(cssClass.mute); }); theAudio.addEventListener('ended', function(){ thePlayer.removeClass(cssClass.playing); if(isLoop){ isSupport ? theAudio.play():theAudio.Play(); thePlayer.addClass(cssClass.playing); }}); theBar.on(eStart, function(e){ adjustCurrentTime(e); theBar.on(eMove, function(e){ adjustCurrentTime(e); }); }) .on(eCancel, function(){ theBar.unbind(eMove); }); volumeButton.on('click', function(){ if(thePlayer.hasClass(cssClass.mute)){ thePlayer.removeClass(cssClass.mute); theAudio.volume=volumeDefault; }else{ thePlayer.addClass(cssClass.mute); volumeDefault=theAudio.volume; theAudio.volume=0; } return false; }); volumeAdjuster.on(eStart, function(e){ adjustVolume(e); volumeAdjuster.on(eMove, function(e){ adjustVolume(e); }); }) .on(eCancel, function(){ volumeAdjuster.unbind(eMove); }); } else thePlayer.addClass(cssClass.mini); thePlayer.find('.' + cssClass.playPause).on('click', function(){ if(thePlayer.hasClass(cssClass.playing)){ $(this).attr('title', params.strPlay).find('a').html(params.strPlay); thePlayer.removeClass(cssClass.playing); isSupport ? theAudio.pause():theAudio.Stop(); }else{ $(this).attr('title', params.strPause).find('a').html(params.strPause); thePlayer.addClass(cssClass.playing); isSupport ? theAudio.play():theAudio.Play(); } return false; }); $this.replaceWith(thePlayer); }); return this; };})(jQuery, window, document); var Chart=function(s){function v(a,c,b){a=A((a-c.graphMin)/(c.steps*c.stepValue),1,0);return b*c.steps*a}function x(a,c,b,e){function h(){g+=f;var k=a.animation?A(d(g),null,0):1;e.clearRect(0,0,q,u);a.scaleOverlay?(b(k),c()):(c(),b(k));if(1>=g)D(h);else if("function"==typeof a.onAnimationComplete)a.onAnimationComplete()}var f=a.animation?1/A(a.animationSteps,Number.MAX_VALUE,1):1,d=B[a.animationEasing],g=a.animation?0:1;"function"!==typeof c&&(c=function(){});D(h)}function C(a,c,b,e,h,f){var d;a= Math.floor(Math.log(e-h)/Math.LN10);h=Math.floor(h/(1*Math.pow(10,a)))*Math.pow(10,a);e=Math.ceil(e/(1*Math.pow(10,a)))*Math.pow(10,a)-h;a=Math.pow(10,a);for(d=Math.round(e/a);dc;)a=dc?c:!isNaN(parseFloat(b))&& isFinite(b)&&a)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split("\t").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');");return c? b(c):b}var r=this,B={linear:function(a){return a},easeInQuad:function(a){return a*a},easeOutQuad:function(a){return-1*a*(a-2)},easeInOutQuad:function(a){return 1>(a/=0.5)?0.5*a*a:-0.5*(--a*(a-2)-1)},easeInCubic:function(a){return a*a*a},easeOutCubic:function(a){return 1*((a=a/1-1)*a*a+1)},easeInOutCubic:function(a){return 1>(a/=0.5)?0.5*a*a*a:0.5*((a-=2)*a*a+2)},easeInQuart:function(a){return a*a*a*a},easeOutQuart:function(a){return-1*((a=a/1-1)*a*a*a-1)},easeInOutQuart:function(a){return 1>(a/=0.5)? 0.5*a*a*a*a:-0.5*((a-=2)*a*a*a-2)},easeInQuint:function(a){return 1*(a/=1)*a*a*a*a},easeOutQuint:function(a){return 1*((a=a/1-1)*a*a*a*a+1)},easeInOutQuint:function(a){return 1>(a/=0.5)?0.5*a*a*a*a*a:0.5*((a-=2)*a*a*a*a+2)},easeInSine:function(a){return-1*Math.cos(a/1*(Math.PI/2))+1},easeOutSine:function(a){return 1*Math.sin(a/1*(Math.PI/2))},easeInOutSine:function(a){return-0.5*(Math.cos(Math.PI*a/1)-1)},easeInExpo:function(a){return 0==a?1:1*Math.pow(2,10*(a/1-1))},easeOutExpo:function(a){return 1==a?1:1*(-Math.pow(2,-10*a/1)+1)},easeInOutExpo:function(a){return 0==a?0:1==a?1:1>(a/=0.5)?0.5*Math.pow(2,10*(a-1)):0.5*(-Math.pow(2,-10*--a)+2)},easeInCirc:function(a){return 1<=a?a:-1*(Math.sqrt(1-(a/=1)*a)-1)},easeOutCirc:function(a){return 1*Math.sqrt(1-(a=a/1-1)*a)},easeInOutCirc:function(a){return 1>(a/=0.5)?-0.5*(Math.sqrt(1-a*a)-1):0.5*(Math.sqrt(1-(a-=2)*a)+1)},easeInElastic:function(a){var c=1.70158,b=0,e=1;if(0==a)return 0;if(1==(a/=1))return 1;b||(b=0.3);ea?-0.5*e*Math.pow(2,10* (a-=1))*Math.sin((1*a-c)*2*Math.PI/b):0.5*e*Math.pow(2,-10*(a-=1))*Math.sin((1*a-c)*2*Math.PI/b)+1},easeInBack:function(a){return 1*(a/=1)*a*(2.70158*a-1.70158)},easeOutBack:function(a){return 1*((a=a/1-1)*a*(2.70158*a+1.70158)+1)},easeInOutBack:function(a){var c=1.70158;return 1>(a/=0.5)?0.5*a*a*(((c*=1.525)+1)*a-c):0.5*((a-=2)*a*(((c*=1.525)+1)*a+c)+2)},easeInBounce:function(a){return 1-B.easeOutBounce(1-a)},easeOutBounce:function(a){return(a/=1)<1/2.75?1*7.5625*a*a:a<2/2.75?1*(7.5625*(a-=1.5/2.75)* a+0.75):a<2.5/2.75?1*(7.5625*(a-=2.25/2.75)*a+0.9375):1*(7.5625*(a-=2.625/2.75)*a+0.984375)},easeInOutBounce:function(a){return 0.5>a?0.5*B.easeInBounce(2*a):0.5*B.easeOutBounce(2*a-1)+0.5}},q=s.canvas.width,u=s.canvas.height;window.devicePixelRatio&&(s.canvas.style.width=q+"px",s.canvas.style.height=u+"px",s.canvas.height=u*window.devicePixelRatio,s.canvas.width=q*window.devicePixelRatio,s.scale(window.devicePixelRatio,window.devicePixelRatio));this.PolarArea=function(a,c){r.PolarArea.defaults={scaleOverlay:!0, scaleOverride:!1,scaleSteps:null,scaleStepWidth:null,scaleStartValue:null,scaleShowLine:!0,scaleLineColor:"rgba(0,0,0,.1)",scaleLineWidth:1,scaleShowLabels:!0,scaleLabel:"<%=value%>",scaleFontFamily:"'Arial'",scaleFontSize:12,scaleFontStyle:"normal",scaleFontColor:"#666",scaleShowLabelBackdrop:!0,scaleBackdropColor:"rgba(255,255,255,0.75)",scaleBackdropPaddingY:2,scaleBackdropPaddingX:2,segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,animation:!0,animationSteps:100,animationEasing:"easeOutBounce", animateRotate:!0,animateScale:!1,onAnimationComplete:null};var b=c?y(r.PolarArea.defaults,c):r.PolarArea.defaults;return new G(a,b,s)};this.Radar=function(a,c){r.Radar.defaults={scaleOverlay:!1,scaleOverride:!1,scaleSteps:null,scaleStepWidth:null,scaleStartValue:null,scaleShowLine:!0,scaleLineColor:"rgba(0,0,0,.1)",scaleLineWidth:1,scaleShowLabels:!1,scaleLabel:"<%=value%>",scaleFontFamily:"'Arial'",scaleFontSize:12,scaleFontStyle:"normal",scaleFontColor:"#666",scaleShowLabelBackdrop:!0,scaleBackdropColor:"rgba(255,255,255,0.75)", scaleBackdropPaddingY:2,scaleBackdropPaddingX:2,angleShowLineOut:!0,angleLineColor:"rgba(0,0,0,.1)",angleLineWidth:1,pointLabelFontFamily:"'Arial'",pointLabelFontStyle:"normal",pointLabelFontSize:12,pointLabelFontColor:"#666",pointDot:!0,pointDotRadius:3,pointDotStrokeWidth:1,datasetStroke:!0,datasetStrokeWidth:2,datasetFill:!0,animation:!0,animationSteps:60,animationEasing:"easeOutQuart",onAnimationComplete:null};var b=c?y(r.Radar.defaults,c):r.Radar.defaults;return new H(a,b,s)};this.Pie=function(a, c){r.Pie.defaults={segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,animation:!0,animationSteps:100,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1,onAnimationComplete:null};var b=c?y(r.Pie.defaults,c):r.Pie.defaults;return new I(a,b,s)};this.Doughnut=function(a,c){r.Doughnut.defaults={segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,percentageInnerCutout:50,animation:!0,animationSteps:100,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1, onAnimationComplete:null};var b=c?y(r.Doughnut.defaults,c):r.Doughnut.defaults;return new J(a,b,s)};this.Line=function(a,c){r.Line.defaults={scaleOverlay:!1,scaleOverride:!1,scaleSteps:null,scaleStepWidth:null,scaleStartValue:null,scaleLineColor:"rgba(0,0,0,.1)",scaleLineWidth:1,scaleShowLabels:!0,scaleLabel:"<%=value%>",scaleFontFamily:"'Arial'",scaleFontSize:12,scaleFontStyle:"normal",scaleFontColor:"#666",scaleShowGridLines:!0,scaleGridLineColor:"rgba(0,0,0,.05)",scaleGridLineWidth:1,bezierCurve:!0, pointDot:!0,pointDotRadius:4,pointDotStrokeWidth:2,datasetStroke:!0,datasetStrokeWidth:2,datasetFill:!0,animation:!0,animationSteps:60,animationEasing:"easeOutQuart",onAnimationComplete:null};var b=c?y(r.Line.defaults,c):r.Line.defaults;return new K(a,b,s)};this.Bar=function(a,c){r.Bar.defaults={scaleOverlay:!1,scaleOverride:!1,scaleSteps:null,scaleStepWidth:null,scaleStartValue:null,scaleLineColor:"rgba(0,0,0,.1)",scaleLineWidth:1,scaleShowLabels:!0,scaleLabel:"<%=value%>",scaleFontFamily:"'Arial'", scaleFontSize:12,scaleFontStyle:"normal",scaleFontColor:"#666",scaleShowGridLines:!0,scaleGridLineColor:"rgba(0,0,0,.05)",scaleGridLineWidth:1,barShowStroke:!0,barStrokeWidth:2,barValueSpacing:5,barDatasetSpacing:1,animation:!0,animationSteps:60,animationEasing:"easeOutQuart",onAnimationComplete:null};var b=c?y(r.Bar.defaults,c):r.Bar.defaults;return new L(a,b,s)};var G=function(a,c,b){var e,h,f,d,g,k,j,l,m;g=Math.min.apply(Math,[q,u])/2;g-=Math.max.apply(Math,[0.5*c.scaleFontSize,0.5*c.scaleLineWidth]); d=2*c.scaleFontSize;c.scaleShowLabelBackdrop&&(d+=2*c.scaleBackdropPaddingY,g-=1.5*c.scaleBackdropPaddingY);l=g;d=d?d:5;e=Number.MIN_VALUE;h=Number.MAX_VALUE;for(f=0;fe&&(e=a[f].value),a[f].valuel&&(l=h);g-=Math.max.apply(Math,[l,1.5*(c.pointLabelFontSize/2)]);g-=c.pointLabelFontSize;l=g=A(g,null,0);d=d?d:5;e=Number.MIN_VALUE; h=Number.MAX_VALUE;for(f=0;fe&&(e=a.datasets[f].data[m]),a.datasets[f].data[m]Math.PI?"right":"left";b.textBaseline="middle";b.fillText(a.labels[d],f,-h)}b.restore()},function(d){var e=2*Math.PI/a.datasets[0].data.length;b.save();b.translate(q/2,u/2);for(var g=0;gt?e:t;q/a.labels.lengthe&&(e=a.datasets[f].data[l]),a.datasets[f].data[l]d?h:d;d+=10}r=q-d-t;m=Math.floor(r/(a.labels.length-1));n=q-t/2-r;p=g+c.scaleFontSize/2;x(c,function(){b.lineWidth=c.scaleLineWidth;b.strokeStyle=c.scaleLineColor;b.beginPath();b.moveTo(q-t/2+5,p);b.lineTo(q-t/2-r-5,p);b.stroke();0t?e:t;q/a.labels.lengthe&&(e=a.datasets[f].data[l]),a.datasets[f].data[l]< h&&(h=a.datasets[f].data[l]);f=Math.floor(g/(0.66*d));d=Math.floor(0.5*(g/d));l=c.scaleShowLabels?c.scaleLabel:"";c.scaleOverride?(j={steps:c.scaleSteps,stepValue:c.scaleStepWidth,graphMin:c.scaleStartValue,labels:[]},z(l,j.labels,j.steps,c.scaleStartValue,c.scaleStepWidth)):j=C(g,f,d,e,h,l);k=Math.floor(g/j.steps);d=1;if(c.scaleShowLabels){b.font=c.scaleFontStyle+" "+c.scaleFontSize+"px "+c.scaleFontFamily;for(e=0;ed?h:d;d+=10}r=q-d-t;m= Math.floor(r/a.labels.length);s=(m-2*c.scaleGridLineWidth-2*c.barValueSpacing-(c.barDatasetSpacing*a.datasets.length-1)-(c.barStrokeWidth/2*a.datasets.length-1))/a.datasets.length;n=q-t/2-r;p=g+c.scaleFontSize/2;x(c,function(){b.lineWidth=c.scaleLineWidth;b.strokeStyle=c.scaleLineColor;b.beginPath();b.moveTo(q-t/2+5,p);b.lineTo(q-t/2-r-5,p);b.stroke();0 0){ for (i in momentProperties){ prop=momentProperties[i]; val=from[prop]; if(!isUndefined(val)){ to[prop]=val; }} } return to; } var updateInProgress=false; function Moment(config){ copyConfig(this, config); this._d=new Date(config._d!=null ? config._d.getTime():NaN); if(updateInProgress===false){ updateInProgress=true; utils_hooks__hooks.updateOffset(this); updateInProgress=false; }} function isMoment (obj){ return obj instanceof Moment||(obj!=null&&obj._isAMomentObject!=null); } function absFloor (number){ if(number < 0){ return Math.ceil(number); }else{ return Math.floor(number); }} function toInt(argumentForCoercion){ var coercedNumber=+argumentForCoercion, value=0; if(coercedNumber!==0&&isFinite(coercedNumber)){ value=absFloor(coercedNumber); } return value; } function compareArrays(array1, array2, dontConvert){ var len=Math.min(array1.length, array2.length), lengthDiff=Math.abs(array1.length - array2.length), diffs=0, i; for (i=0; i < len; i++){ if((dontConvert&&array1[i]!==array2[i]) || (!dontConvert&&toInt(array1[i])!==toInt(array2[i]))){ diffs++; }} return diffs + lengthDiff; } function warn(msg){ if(utils_hooks__hooks.suppressDeprecationWarnings===false && (typeof console!=='undefined')&&console.warn){ console.warn('Deprecation warning: ' + msg); }} function deprecate(msg, fn){ var firstTime=true; return extend(function (){ if(firstTime){ warn(msg + '\nArguments: ' + Array.prototype.slice.call(arguments).join(', ') + '\n' + (new Error()).stack); firstTime=false; } return fn.apply(this, arguments); }, fn); } var deprecations={}; function deprecateSimple(name, msg){ if(!deprecations[name]){ warn(msg); deprecations[name]=true; }} utils_hooks__hooks.suppressDeprecationWarnings=false; function isFunction(input){ return input instanceof Function||Object.prototype.toString.call(input)==='[object Function]'; } function isObject(input){ return Object.prototype.toString.call(input)==='[object Object]'; } function locale_set__set (config){ var prop, i; for (i in config){ prop=config[i]; if(isFunction(prop)){ this[i]=prop; }else{ this['_' + i]=prop; }} this._config=config; this._ordinalParseLenient=new RegExp(this._ordinalParse.source + '|' + (/\d{1,2}/).source); } function mergeConfigs(parentConfig, childConfig){ var res=extend({}, parentConfig), prop; for (prop in childConfig){ if(hasOwnProp(childConfig, prop)){ if(isObject(parentConfig[prop])&&isObject(childConfig[prop])){ res[prop]={}; extend(res[prop], parentConfig[prop]); extend(res[prop], childConfig[prop]); }else if(childConfig[prop]!=null){ res[prop]=childConfig[prop]; }else{ delete res[prop]; }} } return res; } function Locale(config){ if(config!=null){ this.set(config); }} var locales={}; var globalLocale; function normalizeLocale(key){ return key ? key.toLowerCase().replace('_', '-'):key; } function chooseLocale(names){ var i=0, j, next, locale, split; while (i < names.length){ split=normalizeLocale(names[i]).split('-'); j=split.length; next=normalizeLocale(names[i + 1]); next=next ? next.split('-'):null; while (j > 0){ locale=loadLocale(split.slice(0, j).join('-')); if(locale){ return locale; } if(next&&next.length >=j&&compareArrays(split, next, true) >=j - 1){ break; } j--; } i++; } return null; } function loadLocale(name){ var oldLocale=null; if(!locales[name]&&(typeof module!=='undefined') && module&&module.exports){ try { oldLocale=globalLocale._abbr; require('./locale/' + name); locale_locales__getSetGlobalLocale(oldLocale); } catch (e){ }} return locales[name]; } function locale_locales__getSetGlobalLocale (key, values){ var data; if(key){ if(isUndefined(values)){ data=locale_locales__getLocale(key); }else{ data=defineLocale(key, values); } if(data){ globalLocale=data; }} return globalLocale._abbr; } function defineLocale (name, config){ if(config!==null){ config.abbr=name; if(locales[name]!=null){ deprecateSimple('defineLocaleOverride', 'use moment.updateLocale(localeName, config) to change ' + 'an existing locale. moment.defineLocale(localeName, ' + 'config) should only be used for creating a new locale'); config=mergeConfigs(locales[name]._config, config); }else if(config.parentLocale!=null){ if(locales[config.parentLocale]!=null){ config=mergeConfigs(locales[config.parentLocale]._config, config); }else{ deprecateSimple('parentLocaleUndefined', 'specified parentLocale is not defined yet'); }} locales[name]=new Locale(config); locale_locales__getSetGlobalLocale(name); return locales[name]; }else{ delete locales[name]; return null; }} function updateLocale(name, config){ if(config!=null){ var locale; if(locales[name]!=null){ config=mergeConfigs(locales[name]._config, config); } locale=new Locale(config); locale.parentLocale=locales[name]; locales[name]=locale; locale_locales__getSetGlobalLocale(name); }else{ if(locales[name]!=null){ if(locales[name].parentLocale!=null){ locales[name]=locales[name].parentLocale; }else if(locales[name]!=null){ delete locales[name]; }} } return locales[name]; } function locale_locales__getLocale (key){ var locale; if(key&&key._locale&&key._locale._abbr){ key=key._locale._abbr; } if(!key){ return globalLocale; } if(!isArray(key)){ locale=loadLocale(key); if(locale){ return locale; } key=[key]; } return chooseLocale(key); } function locale_locales__listLocales(){ return Object.keys(locales); } var aliases={}; function addUnitAlias (unit, shorthand){ var lowerCase=unit.toLowerCase(); aliases[lowerCase]=aliases[lowerCase + 's']=aliases[shorthand]=unit; } function normalizeUnits(units){ return typeof units==='string' ? aliases[units]||aliases[units.toLowerCase()]:undefined; } function normalizeObjectUnits(inputObject){ var normalizedInput={}, normalizedProp, prop; for (prop in inputObject){ if(hasOwnProp(inputObject, prop)){ normalizedProp=normalizeUnits(prop); if(normalizedProp){ normalizedInput[normalizedProp]=inputObject[prop]; }} } return normalizedInput; } function makeGetSet (unit, keepTime){ return function (value){ if(value!=null){ get_set__set(this, unit, value); utils_hooks__hooks.updateOffset(this, keepTime); return this; }else{ return get_set__get(this, unit); }};} function get_set__get (mom, unit){ return mom.isValid() ? mom._d['get' + (mom._isUTC ? 'UTC':'') + unit]():NaN; } function get_set__set (mom, unit, value){ if(mom.isValid()){ mom._d['set' + (mom._isUTC ? 'UTC':'') + unit](value); }} function getSet (units, value){ var unit; if(typeof units==='object'){ for (unit in units){ this.set(unit, units[unit]); }}else{ units=normalizeUnits(units); if(isFunction(this[units])){ return this[units](value); }} return this; } function zeroFill(number, targetLength, forceSign){ var absNumber='' + Math.abs(number), zerosToFill=targetLength - absNumber.length, sign=number >=0; return (sign ? (forceSign ? '+':''):'-') + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber; } var formattingTokens=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g; var localFormattingTokens=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g; var formatFunctions={}; var formatTokenFunctions={}; function addFormatToken (token, padded, ordinal, callback){ var func=callback; if(typeof callback==='string'){ func=function (){ return this[callback](); };} if(token){ formatTokenFunctions[token]=func; } if(padded){ formatTokenFunctions[padded[0]]=function (){ return zeroFill(func.apply(this, arguments), padded[1], padded[2]); };} if(ordinal){ formatTokenFunctions[ordinal]=function (){ return this.localeData().ordinal(func.apply(this, arguments), token); };}} function removeFormattingTokens(input){ if(input.match(/\[[\s\S]/)){ return input.replace(/^\[|\]$/g, ''); } return input.replace(/\\/g, ''); } function makeFormatFunction(format){ var array=format.match(formattingTokens), i, length; for (i=0, length=array.length; i < length; i++){ if(formatTokenFunctions[array[i]]){ array[i]=formatTokenFunctions[array[i]]; }else{ array[i]=removeFormattingTokens(array[i]); }} return function (mom){ var output=''; for (i=0; i < length; i++){ output +=array[i] instanceof Function ? array[i].call(mom, format):array[i]; } return output; };} function formatMoment(m, format){ if(!m.isValid()){ return m.localeData().invalidDate(); } format=expandFormat(format, m.localeData()); formatFunctions[format]=formatFunctions[format]||makeFormatFunction(format); return formatFunctions[format](m); } function expandFormat(format, locale){ var i=5; function replaceLongDateFormatTokens(input){ return locale.longDateFormat(input)||input; } localFormattingTokens.lastIndex=0; while (i >=0&&localFormattingTokens.test(format)){ format=format.replace(localFormattingTokens, replaceLongDateFormatTokens); localFormattingTokens.lastIndex=0; i -=1; } return format; } var match1=/\d/; var match2=/\d\d/; var match3=/\d{3}/; var match4=/\d{4}/; var match6=/[+-]?\d{6}/; var match1to2=/\d\d?/; var match3to4=/\d\d\d\d?/; var match5to6=/\d\d\d\d\d\d?/; var match1to3=/\d{1,3}/; var match1to4=/\d{1,4}/; var match1to6=/[+-]?\d{1,6}/; var matchUnsigned=/\d+/; var matchSigned=/[+-]?\d+/; var matchOffset=/Z|[+-]\d\d:?\d\d/gi; var matchShortOffset=/Z|[+-]\d\d(?::?\d\d)?/gi; var matchTimestamp=/[+-]?\d+(\.\d{1,3})?/; var matchWord=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i; var regexes={}; function addRegexToken (token, regex, strictRegex){ regexes[token]=isFunction(regex) ? regex:function (isStrict, localeData){ return (isStrict&&strictRegex) ? strictRegex:regex; };} function getParseRegexForToken (token, config){ if(!hasOwnProp(regexes, token)){ return new RegExp(unescapeFormat(token)); } return regexes[token](config._strict, config._locale); } function unescapeFormat(s){ return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4){ return p1||p2||p3||p4; })); } function regexEscape(s){ return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); } var tokens={}; function addParseToken (token, callback){ var i, func=callback; if(typeof token==='string'){ token=[token]; } if(typeof callback==='number'){ func=function (input, array){ array[callback]=toInt(input); };} for (i=0; i < token.length; i++){ tokens[token[i]]=func; }} function addWeekParseToken (token, callback){ addParseToken(token, function (input, array, config, token){ config._w=config._w||{}; callback(input, config._w, config, token); }); } function addTimeToArrayFromToken(token, input, config){ if(input!=null&&hasOwnProp(tokens, token)){ tokens[token](input, config._a, config, token); }} var YEAR=0; var MONTH=1; var DATE=2; var HOUR=3; var MINUTE=4; var SECOND=5; var MILLISECOND=6; var WEEK=7; var WEEKDAY=8; function daysInMonth(year, month){ return new Date(Date.UTC(year, month + 1, 0)).getUTCDate(); } addFormatToken('M', ['MM', 2], 'Mo', function (){ return this.month() + 1; }); addFormatToken('MMM', 0, 0, function (format){ return this.localeData().monthsShort(this, format); }); addFormatToken('MMMM', 0, 0, function (format){ return this.localeData().months(this, format); }); addUnitAlias('month', 'M'); addRegexToken('M', match1to2); addRegexToken('MM', match1to2, match2); addRegexToken('MMM', function (isStrict, locale){ return locale.monthsShortRegex(isStrict); }); addRegexToken('MMMM', function (isStrict, locale){ return locale.monthsRegex(isStrict); }); addParseToken(['M', 'MM'], function (input, array){ array[MONTH]=toInt(input) - 1; }); addParseToken(['MMM', 'MMMM'], function (input, array, config, token){ var month=config._locale.monthsParse(input, token, config._strict); if(month!=null){ array[MONTH]=month; }else{ getParsingFlags(config).invalidMonth=input; }}); var MONTHS_IN_FORMAT=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/; var defaultLocaleMonths='January_February_March_April_May_June_July_August_September_October_November_December'.split('_'); function localeMonths (m, format){ return isArray(this._months) ? this._months[m.month()] : this._months[MONTHS_IN_FORMAT.test(format) ? 'format':'standalone'][m.month()]; } var defaultLocaleMonthsShort='Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'); function localeMonthsShort (m, format){ return isArray(this._monthsShort) ? this._monthsShort[m.month()] : this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format':'standalone'][m.month()]; } function localeMonthsParse (monthName, format, strict){ var i, mom, regex; if(!this._monthsParse){ this._monthsParse=[]; this._longMonthsParse=[]; this._shortMonthsParse=[]; } for (i=0; i < 12; i++){ mom=create_utc__createUTC([2000, i]); if(strict&&!this._longMonthsParse[i]){ this._longMonthsParse[i]=new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i'); this._shortMonthsParse[i]=new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i'); } if(!strict&&!this._monthsParse[i]){ regex='^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); this._monthsParse[i]=new RegExp(regex.replace('.', ''), 'i'); } if(strict&&format==='MMMM'&&this._longMonthsParse[i].test(monthName)){ return i; }else if(strict&&format==='MMM'&&this._shortMonthsParse[i].test(monthName)){ return i; }else if(!strict&&this._monthsParse[i].test(monthName)){ return i; }} } function setMonth (mom, value){ var dayOfMonth; if(!mom.isValid()){ return mom; } if(typeof value==='string'){ if(/^\d+$/.test(value)){ value=toInt(value); }else{ value=mom.localeData().monthsParse(value); if(typeof value!=='number'){ return mom; }} } dayOfMonth=Math.min(mom.date(), daysInMonth(mom.year(), value)); mom._d['set' + (mom._isUTC ? 'UTC':'') + 'Month'](value, dayOfMonth); return mom; } function getSetMonth (value){ if(value!=null){ setMonth(this, value); utils_hooks__hooks.updateOffset(this, true); return this; }else{ return get_set__get(this, 'Month'); }} function getDaysInMonth (){ return daysInMonth(this.year(), this.month()); } var defaultMonthsShortRegex=matchWord; function monthsShortRegex (isStrict){ if(this._monthsParseExact){ if(!hasOwnProp(this, '_monthsRegex')){ computeMonthsParse.call(this); } if(isStrict){ return this._monthsShortStrictRegex; }else{ return this._monthsShortRegex; }}else{ return this._monthsShortStrictRegex&&isStrict ? this._monthsShortStrictRegex:this._monthsShortRegex; }} var defaultMonthsRegex=matchWord; function monthsRegex (isStrict){ if(this._monthsParseExact){ if(!hasOwnProp(this, '_monthsRegex')){ computeMonthsParse.call(this); } if(isStrict){ return this._monthsStrictRegex; }else{ return this._monthsRegex; }}else{ return this._monthsStrictRegex&&isStrict ? this._monthsStrictRegex:this._monthsRegex; }} function computeMonthsParse (){ function cmpLenRev(a, b){ return b.length - a.length; } var shortPieces=[], longPieces=[], mixedPieces=[], i, mom; for (i=0; i < 12; i++){ mom=create_utc__createUTC([2000, i]); shortPieces.push(this.monthsShort(mom, '')); longPieces.push(this.months(mom, '')); mixedPieces.push(this.months(mom, '')); mixedPieces.push(this.monthsShort(mom, '')); } shortPieces.sort(cmpLenRev); longPieces.sort(cmpLenRev); mixedPieces.sort(cmpLenRev); for (i=0; i < 12; i++){ shortPieces[i]=regexEscape(shortPieces[i]); longPieces[i]=regexEscape(longPieces[i]); mixedPieces[i]=regexEscape(mixedPieces[i]); } this._monthsRegex=new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); this._monthsShortRegex=this._monthsRegex; this._monthsStrictRegex=new RegExp('^(' + longPieces.join('|') + ')$', 'i'); this._monthsShortStrictRegex=new RegExp('^(' + shortPieces.join('|') + ')$', 'i'); } function checkOverflow (m){ var overflow; var a=m._a; if(a&&getParsingFlags(m).overflow===-2){ overflow = a[MONTH] < 0||a[MONTH] > 11 ? MONTH : a[DATE] < 1||a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : a[HOUR] < 0||a[HOUR] > 24||(a[HOUR]===24&&(a[MINUTE]!==0||a[SECOND]!==0||a[MILLISECOND]!==0)) ? HOUR : a[MINUTE] < 0||a[MINUTE] > 59 ? MINUTE : a[SECOND] < 0||a[SECOND] > 59 ? SECOND : a[MILLISECOND] < 0||a[MILLISECOND] > 999 ? MILLISECOND : -1; if(getParsingFlags(m)._overflowDayOfYear&&(overflow < YEAR||overflow > DATE)){ overflow=DATE; } if(getParsingFlags(m)._overflowWeeks&&overflow===-1){ overflow=WEEK; } if(getParsingFlags(m)._overflowWeekday&&overflow===-1){ overflow=WEEKDAY; } getParsingFlags(m).overflow=overflow; } return m; } var extendedIsoRegex=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T|)(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/; var basicIsoRegex=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T|)(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/; var tzRegex=/Z|[+-]\d\d(?::?\d\d)?/; var isoDates=[ ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], ['GGGG-[W]WW', /\d{4}-W\d\d/, false], ['YYYY-DDD', /\d{4}-\d{3}/], ['YYYY-MM', /\d{4}-\d\d/, false], ['YYYYYYMMDD', /[+-]\d{10}/], ['YYYYMMDD', /\d{8}/], ['GGGG[W]WWE', /\d{4}W\d{3}/], ['GGGG[W]WW', /\d{4}W\d{2}/, false], ['YYYYDDD', /\d{7}/] ]; var isoTimes=[ ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], ['HH:mm:ss', /\d\d:\d\d:\d\d/], ['HH:mm', /\d\d:\d\d/], ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], ['HHmmss', /\d\d\d\d\d\d/], ['HHmm', /\d\d\d\d/], ['HH', /\d\d/] ]; var aspNetJsonRegex=/^\/?Date\((\-?\d+)/i; function configFromISO(config){ var i, l, string=config._i, match=extendedIsoRegex.exec(string)||basicIsoRegex.exec(string), allowTime, dateFormat, timeFormat, tzFormat; if(match){ getParsingFlags(config).iso=true; for (i=0, l=isoDates.length; i < l; i++){ if(isoDates[i][1].exec(match[1])){ dateFormat=isoDates[i][0]; allowTime=isoDates[i][2]!==false; break; }} if(dateFormat==null){ config._isValid=false; return; } if(match[3]){ for (i=0, l=isoTimes.length; i < l; i++){ if(isoTimes[i][1].exec(match[3])){ timeFormat=(match[2]||' ') + isoTimes[i][0]; break; }} if(timeFormat==null){ config._isValid=false; return; }} if(!allowTime&&timeFormat!=null){ config._isValid=false; return; } if(match[4]){ if(tzRegex.exec(match[4])){ tzFormat='Z'; }else{ config._isValid=false; return; }} config._f=dateFormat + (timeFormat||'') + (tzFormat||''); configFromStringAndFormat(config); }else{ config._isValid=false; }} function configFromString(config){ var matched=aspNetJsonRegex.exec(config._i); if(matched!==null){ config._d=new Date(+matched[1]); return; } configFromISO(config); if(config._isValid===false){ delete config._isValid; utils_hooks__hooks.createFromInputFallback(config); }} utils_hooks__hooks.createFromInputFallback=deprecate( 'moment construction falls back to js Date. This is ' + 'discouraged and will be removed in upcoming major ' + 'release. Please refer to ' + 'https://github.com/moment/moment/issues/1407 for more info.', function (config){ config._d=new Date(config._i + (config._useUTC ? ' UTC':'')); } ); function createDate (y, m, d, h, M, s, ms){ var date=new Date(y, m, d, h, M, s, ms); if(y < 100&&y >=0&&isFinite(date.getFullYear())){ date.setFullYear(y); } return date; } function createUTCDate (y){ var date=new Date(Date.UTC.apply(null, arguments)); if(y < 100&&y >=0&&isFinite(date.getUTCFullYear())){ date.setUTCFullYear(y); } return date; } addFormatToken('Y', 0, 0, function (){ var y=this.year(); return y <=9999 ? '' + y:'+' + y; }); addFormatToken(0, ['YY', 2], 0, function (){ return this.year() % 100; }); addFormatToken(0, ['YYYY', 4], 0, 'year'); addFormatToken(0, ['YYYYY', 5], 0, 'year'); addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); addUnitAlias('year', 'y'); addRegexToken('Y', matchSigned); addRegexToken('YY', match1to2, match2); addRegexToken('YYYY', match1to4, match4); addRegexToken('YYYYY', match1to6, match6); addRegexToken('YYYYYY', match1to6, match6); addParseToken(['YYYYY', 'YYYYYY'], YEAR); addParseToken('YYYY', function (input, array){ array[YEAR]=input.length===2 ? utils_hooks__hooks.parseTwoDigitYear(input):toInt(input); }); addParseToken('YY', function (input, array){ array[YEAR]=utils_hooks__hooks.parseTwoDigitYear(input); }); addParseToken('Y', function (input, array){ array[YEAR]=parseInt(input, 10); }); function daysInYear(year){ return isLeapYear(year) ? 366:365; } function isLeapYear(year){ return (year % 4===0&&year % 100!==0)||year % 400===0; } utils_hooks__hooks.parseTwoDigitYear=function (input){ return toInt(input) + (toInt(input) > 68 ? 1900:2000); }; var getSetYear=makeGetSet('FullYear', false); function getIsLeapYear (){ return isLeapYear(this.year()); } function firstWeekOffset(year, dow, doy){ var fwd=7 + dow - doy, fwdlw=(7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7; return -fwdlw + fwd - 1; } function dayOfYearFromWeeks(year, week, weekday, dow, doy){ var localWeekday=(7 + weekday - dow) % 7, weekOffset=firstWeekOffset(year, dow, doy), dayOfYear=1 + 7 * (week - 1) + localWeekday + weekOffset, resYear, resDayOfYear; if(dayOfYear <=0){ resYear=year - 1; resDayOfYear=daysInYear(resYear) + dayOfYear; }else if(dayOfYear > daysInYear(year)){ resYear=year + 1; resDayOfYear=dayOfYear - daysInYear(year); }else{ resYear=year; resDayOfYear=dayOfYear; } return { year: resYear, dayOfYear: resDayOfYear };} function weekOfYear(mom, dow, doy){ var weekOffset=firstWeekOffset(mom.year(), dow, doy), week=Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, resWeek, resYear; if(week < 1){ resYear=mom.year() - 1; resWeek=week + weeksInYear(resYear, dow, doy); }else if(week > weeksInYear(mom.year(), dow, doy)){ resWeek=week - weeksInYear(mom.year(), dow, doy); resYear=mom.year() + 1; }else{ resYear=mom.year(); resWeek=week; } return { week: resWeek, year: resYear };} function weeksInYear(year, dow, doy){ var weekOffset=firstWeekOffset(year, dow, doy), weekOffsetNext=firstWeekOffset(year + 1, dow, doy); return (daysInYear(year) - weekOffset + weekOffsetNext) / 7; } function defaults(a, b, c){ if(a!=null){ return a; } if(b!=null){ return b; } return c; } function currentDateArray(config){ var nowValue=new Date(utils_hooks__hooks.now()); if(config._useUTC){ return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()]; } return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()]; } function configFromArray (config){ var i, date, input=[], currentDate, yearToUse; if(config._d){ return; } currentDate=currentDateArray(config); if(config._w&&config._a[DATE]==null&&config._a[MONTH]==null){ dayOfYearFromWeekInfo(config); } if(config._dayOfYear){ yearToUse=defaults(config._a[YEAR], currentDate[YEAR]); if(config._dayOfYear > daysInYear(yearToUse)){ getParsingFlags(config)._overflowDayOfYear=true; } date=createUTCDate(yearToUse, 0, config._dayOfYear); config._a[MONTH]=date.getUTCMonth(); config._a[DATE]=date.getUTCDate(); } for (i=0; i < 3&&config._a[i]==null; ++i){ config._a[i]=input[i]=currentDate[i]; } for (; i < 7; i++){ config._a[i]=input[i]=(config._a[i]==null) ? (i===2 ? 1:0):config._a[i]; } if(config._a[HOUR]===24 && config._a[MINUTE]===0 && config._a[SECOND]===0 && config._a[MILLISECOND]===0){ config._nextDay=true; config._a[HOUR]=0; } config._d=(config._useUTC ? createUTCDate:createDate).apply(null, input); if(config._tzm!=null){ config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); } if(config._nextDay){ config._a[HOUR]=24; }} function dayOfYearFromWeekInfo(config){ var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow; w=config._w; if(w.GG!=null||w.W!=null||w.E!=null){ dow=1; doy=4; weekYear=defaults(w.GG, config._a[YEAR], weekOfYear(local__createLocal(), 1, 4).year); week=defaults(w.W, 1); weekday=defaults(w.E, 1); if(weekday < 1||weekday > 7){ weekdayOverflow=true; }}else{ dow=config._locale._week.dow; doy=config._locale._week.doy; weekYear=defaults(w.gg, config._a[YEAR], weekOfYear(local__createLocal(), dow, doy).year); week=defaults(w.w, 1); if(w.d!=null){ weekday=w.d; if(weekday < 0||weekday > 6){ weekdayOverflow=true; }}else if(w.e!=null){ weekday=w.e + dow; if(w.e < 0||w.e > 6){ weekdayOverflow=true; }}else{ weekday=dow; }} if(week < 1||week > weeksInYear(weekYear, dow, doy)){ getParsingFlags(config)._overflowWeeks=true; }else if(weekdayOverflow!=null){ getParsingFlags(config)._overflowWeekday=true; }else{ temp=dayOfYearFromWeeks(weekYear, week, weekday, dow, doy); config._a[YEAR]=temp.year; config._dayOfYear=temp.dayOfYear; }} utils_hooks__hooks.ISO_8601=function (){}; function configFromStringAndFormat(config){ if(config._f===utils_hooks__hooks.ISO_8601){ configFromISO(config); return; } config._a=[]; getParsingFlags(config).empty=true; var string='' + config._i, i, parsedInput, tokens, token, skipped, stringLength=string.length, totalParsedInputLength=0; tokens=expandFormat(config._f, config._locale).match(formattingTokens)||[]; for (i=0; i < tokens.length; i++){ token=tokens[i]; parsedInput=(string.match(getParseRegexForToken(token, config))||[])[0]; if(parsedInput){ skipped=string.substr(0, string.indexOf(parsedInput)); if(skipped.length > 0){ getParsingFlags(config).unusedInput.push(skipped); } string=string.slice(string.indexOf(parsedInput) + parsedInput.length); totalParsedInputLength +=parsedInput.length; } if(formatTokenFunctions[token]){ if(parsedInput){ getParsingFlags(config).empty=false; }else{ getParsingFlags(config).unusedTokens.push(token); } addTimeToArrayFromToken(token, parsedInput, config); } else if(config._strict&&!parsedInput){ getParsingFlags(config).unusedTokens.push(token); }} getParsingFlags(config).charsLeftOver=stringLength - totalParsedInputLength; if(string.length > 0){ getParsingFlags(config).unusedInput.push(string); } if(getParsingFlags(config).bigHour===true && config._a[HOUR] <=12 && config._a[HOUR] > 0){ getParsingFlags(config).bigHour=undefined; } config._a[HOUR]=meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem); configFromArray(config); checkOverflow(config); } function meridiemFixWrap (locale, hour, meridiem){ var isPm; if(meridiem==null){ return hour; } if(locale.meridiemHour!=null){ return locale.meridiemHour(hour, meridiem); }else if(locale.isPM!=null){ isPm=locale.isPM(meridiem); if(isPm&&hour < 12){ hour +=12; } if(!isPm&&hour===12){ hour=0; } return hour; }else{ return hour; }} function configFromStringAndArray(config){ var tempConfig, bestMoment, scoreToBeat, i, currentScore; if(config._f.length===0){ getParsingFlags(config).invalidFormat=true; config._d=new Date(NaN); return; } for (i=0; i < config._f.length; i++){ currentScore=0; tempConfig=copyConfig({}, config); if(config._useUTC!=null){ tempConfig._useUTC=config._useUTC; } tempConfig._f=config._f[i]; configFromStringAndFormat(tempConfig); if(!valid__isValid(tempConfig)){ continue; } currentScore +=getParsingFlags(tempConfig).charsLeftOver; currentScore +=getParsingFlags(tempConfig).unusedTokens.length * 10; getParsingFlags(tempConfig).score=currentScore; if(scoreToBeat==null||currentScore < scoreToBeat){ scoreToBeat=currentScore; bestMoment=tempConfig; }} extend(config, bestMoment||tempConfig); } function configFromObject(config){ if(config._d){ return; } var i=normalizeObjectUnits(config._i); config._a=map([i.year, i.month, i.day||i.date, i.hour, i.minute, i.second, i.millisecond], function (obj){ return obj&&parseInt(obj, 10); }); configFromArray(config); } function createFromConfig (config){ var res=new Moment(checkOverflow(prepareConfig(config))); if(res._nextDay){ res.add(1, 'd'); res._nextDay=undefined; } return res; } function prepareConfig (config){ var input=config._i, format=config._f; config._locale=config._locale||locale_locales__getLocale(config._l); if(input===null||(format===undefined&&input==='')){ return valid__createInvalid({nullInput: true}); } if(typeof input==='string'){ config._i=input=config._locale.preparse(input); } if(isMoment(input)){ return new Moment(checkOverflow(input)); }else if(isArray(format)){ configFromStringAndArray(config); }else if(format){ configFromStringAndFormat(config); }else if(isDate(input)){ config._d=input; }else{ configFromInput(config); } if(!valid__isValid(config)){ config._d=null; } return config; } function configFromInput(config){ var input=config._i; if(input===undefined){ config._d=new Date(utils_hooks__hooks.now()); }else if(isDate(input)){ config._d=new Date(+input); }else if(typeof input==='string'){ configFromString(config); }else if(isArray(input)){ config._a=map(input.slice(0), function (obj){ return parseInt(obj, 10); }); configFromArray(config); }else if(typeof(input)==='object'){ configFromObject(config); }else if(typeof(input)==='number'){ config._d=new Date(input); }else{ utils_hooks__hooks.createFromInputFallback(config); }} function createLocalOrUTC (input, format, locale, strict, isUTC){ var c={}; if(typeof(locale)==='boolean'){ strict=locale; locale=undefined; } c._isAMomentObject=true; c._useUTC=c._isUTC=isUTC; c._l=locale; c._i=input; c._f=format; c._strict=strict; return createFromConfig(c); } function local__createLocal (input, format, locale, strict){ return createLocalOrUTC(input, format, locale, strict, false); } var prototypeMin=deprecate( 'moment().min is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548', function (){ var other=local__createLocal.apply(null, arguments); if(this.isValid()&&other.isValid()){ return other < this ? this:other; }else{ return valid__createInvalid(); }} ); var prototypeMax=deprecate( 'moment().max is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548', function (){ var other=local__createLocal.apply(null, arguments); if(this.isValid()&&other.isValid()){ return other > this ? this:other; }else{ return valid__createInvalid(); }} ); function pickBy(fn, moments){ var res, i; if(moments.length===1&&isArray(moments[0])){ moments=moments[0]; } if(!moments.length){ return local__createLocal(); } res=moments[0]; for (i=1; i < moments.length; ++i){ if(!moments[i].isValid()||moments[i][fn](res)){ res=moments[i]; }} return res; } function min (){ var args=[].slice.call(arguments, 0); return pickBy('isBefore', args); } function max (){ var args=[].slice.call(arguments, 0); return pickBy('isAfter', args); } var now=function (){ return Date.now ? Date.now():+(new Date()); }; function Duration (duration){ var normalizedInput=normalizeObjectUnits(duration), years=normalizedInput.year||0, quarters=normalizedInput.quarter||0, months=normalizedInput.month||0, weeks=normalizedInput.week||0, days=normalizedInput.day||0, hours=normalizedInput.hour||0, minutes=normalizedInput.minute||0, seconds=normalizedInput.second||0, milliseconds=normalizedInput.millisecond||0; this._milliseconds=+milliseconds + seconds * 1e3 + minutes * 6e4 + hours * 36e5; this._days=+days + weeks * 7; this._months=+months + quarters * 3 + years * 12; this._data={}; this._locale=locale_locales__getLocale(); this._bubble(); } function isDuration (obj){ return obj instanceof Duration; } function offset (token, separator){ addFormatToken(token, 0, 0, function (){ var offset=this.utcOffset(); var sign='+'; if(offset < 0){ offset=-offset; sign='-'; } return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2); }); } offset('Z', ':'); offset('ZZ', ''); addRegexToken('Z', matchShortOffset); addRegexToken('ZZ', matchShortOffset); addParseToken(['Z', 'ZZ'], function (input, array, config){ config._useUTC=true; config._tzm=offsetFromString(matchShortOffset, input); }); var chunkOffset=/([\+\-]|\d\d)/gi; function offsetFromString(matcher, string){ var matches=((string||'').match(matcher)||[]); var chunk=matches[matches.length - 1]||[]; var parts=(chunk + '').match(chunkOffset)||['-', 0, 0]; var minutes=+(parts[1] * 60) + toInt(parts[2]); return parts[0]==='+' ? minutes:-minutes; } function cloneWithOffset(input, model){ var res, diff; if(model._isUTC){ res=model.clone(); diff=(isMoment(input)||isDate(input) ? +input:+local__createLocal(input)) - (+res); res._d.setTime(+res._d + diff); utils_hooks__hooks.updateOffset(res, false); return res; }else{ return local__createLocal(input).local(); }} function getDateOffset (m){ return -Math.round(m._d.getTimezoneOffset() / 15) * 15; } utils_hooks__hooks.updateOffset=function (){}; function getSetOffset (input, keepLocalTime){ var offset=this._offset||0, localAdjust; if(!this.isValid()){ return input!=null ? this:NaN; } if(input!=null){ if(typeof input==='string'){ input=offsetFromString(matchShortOffset, input); }else if(Math.abs(input) < 16){ input=input * 60; } if(!this._isUTC&&keepLocalTime){ localAdjust=getDateOffset(this); } this._offset=input; this._isUTC=true; if(localAdjust!=null){ this.add(localAdjust, 'm'); } if(offset!==input){ if(!keepLocalTime||this._changeInProgress){ add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false); }else if(!this._changeInProgress){ this._changeInProgress=true; utils_hooks__hooks.updateOffset(this, true); this._changeInProgress=null; }} return this; }else{ return this._isUTC ? offset:getDateOffset(this); }} function getSetZone (input, keepLocalTime){ if(input!=null){ if(typeof input!=='string'){ input=-input; } this.utcOffset(input, keepLocalTime); return this; }else{ return -this.utcOffset(); }} function setOffsetToUTC (keepLocalTime){ return this.utcOffset(0, keepLocalTime); } function setOffsetToLocal (keepLocalTime){ if(this._isUTC){ this.utcOffset(0, keepLocalTime); this._isUTC=false; if(keepLocalTime){ this.subtract(getDateOffset(this), 'm'); }} return this; } function setOffsetToParsedOffset (){ if(this._tzm){ this.utcOffset(this._tzm); }else if(typeof this._i==='string'){ this.utcOffset(offsetFromString(matchOffset, this._i)); } return this; } function hasAlignedHourOffset (input){ if(!this.isValid()){ return false; } input=input ? local__createLocal(input).utcOffset():0; return (this.utcOffset() - input) % 60===0; } function isDaylightSavingTime (){ return ( this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset() ); } function isDaylightSavingTimeShifted (){ if(!isUndefined(this._isDSTShifted)){ return this._isDSTShifted; } var c={}; copyConfig(c, this); c=prepareConfig(c); if(c._a){ var other=c._isUTC ? create_utc__createUTC(c._a):local__createLocal(c._a); this._isDSTShifted=this.isValid() && compareArrays(c._a, other.toArray()) > 0; }else{ this._isDSTShifted=false; } return this._isDSTShifted; } function isLocal (){ return this.isValid() ? !this._isUTC:false; } function isUtcOffset (){ return this.isValid() ? this._isUTC:false; } function isUtc (){ return this.isValid() ? this._isUTC&&this._offset===0:false; } var aspNetRegex=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/; var isoRegex=/^(-)?P(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)W)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?$/; function create__createDuration (input, key){ var duration=input, match=null, sign, ret, diffRes; if(isDuration(input)){ duration={ ms:input._milliseconds, d:input._days, M:input._months };}else if(typeof input==='number'){ duration={}; if(key){ duration[key]=input; }else{ duration.milliseconds=input; }}else if(!!(match=aspNetRegex.exec(input))){ sign=(match[1]==='-') ? -1:1; duration={ y:0, d:toInt(match[DATE]) * sign, h:toInt(match[HOUR]) * sign, m:toInt(match[MINUTE]) * sign, s:toInt(match[SECOND]) * sign, ms:toInt(match[MILLISECOND]) * sign };}else if(!!(match=isoRegex.exec(input))){ sign=(match[1]==='-') ? -1:1; duration={ y:parseIso(match[2], sign), M:parseIso(match[3], sign), w:parseIso(match[4], sign), d:parseIso(match[5], sign), h:parseIso(match[6], sign), m:parseIso(match[7], sign), s:parseIso(match[8], sign) };}else if(duration==null){ duration={};}else if(typeof duration==='object'&&('from' in duration||'to' in duration)){ diffRes=momentsDifference(local__createLocal(duration.from), local__createLocal(duration.to)); duration={}; duration.ms=diffRes.milliseconds; duration.M=diffRes.months; } ret=new Duration(duration); if(isDuration(input)&&hasOwnProp(input, '_locale')){ ret._locale=input._locale; } return ret; } create__createDuration.fn=Duration.prototype; function parseIso (inp, sign){ var res=inp&&parseFloat(inp.replace(',', '.')); return (isNaN(res) ? 0:res) * sign; } function positiveMomentsDifference(base, other){ var res={milliseconds: 0, months: 0}; res.months=other.month() - base.month() + (other.year() - base.year()) * 12; if(base.clone().add(res.months, 'M').isAfter(other)){ --res.months; } res.milliseconds=+other - +(base.clone().add(res.months, 'M')); return res; } function momentsDifference(base, other){ var res; if(!(base.isValid()&&other.isValid())){ return {milliseconds: 0, months: 0};} other=cloneWithOffset(other, base); if(base.isBefore(other)){ res=positiveMomentsDifference(base, other); }else{ res=positiveMomentsDifference(other, base); res.milliseconds=-res.milliseconds; res.months=-res.months; } return res; } function absRound (number){ if(number < 0){ return Math.round(-1 * number) * -1; }else{ return Math.round(number); }} function createAdder(direction, name){ return function (val, period){ var dur, tmp; if(period!==null&&!isNaN(+period)){ deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period).'); tmp=val; val=period; period=tmp; } val=typeof val==='string' ? +val:val; dur=create__createDuration(val, period); add_subtract__addSubtract(this, dur, direction); return this; };} function add_subtract__addSubtract (mom, duration, isAdding, updateOffset){ var milliseconds=duration._milliseconds, days=absRound(duration._days), months=absRound(duration._months); if(!mom.isValid()){ return; } updateOffset=updateOffset==null ? true:updateOffset; if(milliseconds){ mom._d.setTime(+mom._d + milliseconds * isAdding); } if(days){ get_set__set(mom, 'Date', get_set__get(mom, 'Date') + days * isAdding); } if(months){ setMonth(mom, get_set__get(mom, 'Month') + months * isAdding); } if(updateOffset){ utils_hooks__hooks.updateOffset(mom, days||months); }} var add_subtract__add=createAdder(1, 'add'); var add_subtract__subtract=createAdder(-1, 'subtract'); function moment_calendar__calendar (time, formats){ var now=time||local__createLocal(), sod=cloneWithOffset(now, this).startOf('day'), diff=this.diff(sod, 'days', true), format=diff < -6 ? 'sameElse' : diff < -1 ? 'lastWeek' : diff < 0 ? 'lastDay' : diff < 1 ? 'sameDay' : diff < 2 ? 'nextDay' : diff < 7 ? 'nextWeek':'sameElse'; var output=formats&&(isFunction(formats[format]) ? formats[format]():formats[format]); return this.format(output||this.localeData().calendar(format, this, local__createLocal(now))); } function clone (){ return new Moment(this); } function isAfter (input, units){ var localInput=isMoment(input) ? input:local__createLocal(input); if(!(this.isValid()&&localInput.isValid())){ return false; } units=normalizeUnits(!isUndefined(units) ? units:'millisecond'); if(units==='millisecond'){ return +this > +localInput; }else{ return +localInput < +this.clone().startOf(units); }} function isBefore (input, units){ var localInput=isMoment(input) ? input:local__createLocal(input); if(!(this.isValid()&&localInput.isValid())){ return false; } units=normalizeUnits(!isUndefined(units) ? units:'millisecond'); if(units==='millisecond'){ return +this < +localInput; }else{ return +this.clone().endOf(units) < +localInput; }} function isBetween (from, to, units){ return this.isAfter(from, units)&&this.isBefore(to, units); } function isSame (input, units){ var localInput=isMoment(input) ? input:local__createLocal(input), inputMs; if(!(this.isValid()&&localInput.isValid())){ return false; } units=normalizeUnits(units||'millisecond'); if(units==='millisecond'){ return +this===+localInput; }else{ inputMs=+localInput; return +(this.clone().startOf(units)) <=inputMs&&inputMs <=+(this.clone().endOf(units)); }} function isSameOrAfter (input, units){ return this.isSame(input, units)||this.isAfter(input,units); } function isSameOrBefore (input, units){ return this.isSame(input, units)||this.isBefore(input,units); } function diff (input, units, asFloat){ var that, zoneDelta, delta, output; if(!this.isValid()){ return NaN; } that=cloneWithOffset(input, this); if(!that.isValid()){ return NaN; } zoneDelta=(that.utcOffset() - this.utcOffset()) * 6e4; units=normalizeUnits(units); if(units==='year'||units==='month'||units==='quarter'){ output=monthDiff(this, that); if(units==='quarter'){ output=output / 3; }else if(units==='year'){ output=output / 12; }}else{ delta=this - that; output=units==='second' ? delta / 1e3 : units==='minute' ? delta / 6e4 : units==='hour' ? delta / 36e5 : units==='day' ? (delta - zoneDelta) / 864e5 : units==='week' ? (delta - zoneDelta) / 6048e5 : delta; } return asFloat ? output:absFloor(output); } function monthDiff (a, b){ var wholeMonthDiff=((b.year() - a.year()) * 12) + (b.month() - a.month()), anchor=a.clone().add(wholeMonthDiff, 'months'), anchor2, adjust; if(b - anchor < 0){ anchor2=a.clone().add(wholeMonthDiff - 1, 'months'); adjust=(b - anchor) / (anchor - anchor2); }else{ anchor2=a.clone().add(wholeMonthDiff + 1, 'months'); adjust=(b - anchor) / (anchor2 - anchor); } return -(wholeMonthDiff + adjust); } utils_hooks__hooks.defaultFormat='YYYY-MM-DDTHH:mm:ssZ'; function toString (){ return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); } function moment_format__toISOString (){ var m=this.clone().utc(); if(0 < m.year()&&m.year() <=9999){ if(isFunction(Date.prototype.toISOString)){ return this.toDate().toISOString(); }else{ return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]'); }}else{ return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'); }} function format (inputString){ var output=formatMoment(this, inputString||utils_hooks__hooks.defaultFormat); return this.localeData().postformat(output); } function from (time, withoutSuffix){ if(this.isValid() && ((isMoment(time)&&time.isValid()) || local__createLocal(time).isValid())){ return create__createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix); }else{ return this.localeData().invalidDate(); }} function fromNow (withoutSuffix){ return this.from(local__createLocal(), withoutSuffix); } function to (time, withoutSuffix){ if(this.isValid() && ((isMoment(time)&&time.isValid()) || local__createLocal(time).isValid())){ return create__createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix); }else{ return this.localeData().invalidDate(); }} function toNow (withoutSuffix){ return this.to(local__createLocal(), withoutSuffix); } function locale (key){ var newLocaleData; if(key===undefined){ return this._locale._abbr; }else{ newLocaleData=locale_locales__getLocale(key); if(newLocaleData!=null){ this._locale=newLocaleData; } return this; }} var lang=deprecate( 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', function (key){ if(key===undefined){ return this.localeData(); }else{ return this.locale(key); }} ); function localeData (){ return this._locale; } function startOf (units){ units=normalizeUnits(units); switch (units){ case 'year': this.month(0); case 'quarter': case 'month': this.date(1); case 'week': case 'isoWeek': case 'day': this.hours(0); case 'hour': this.minutes(0); case 'minute': this.seconds(0); case 'second': this.milliseconds(0); } if(units==='week'){ this.weekday(0); } if(units==='isoWeek'){ this.isoWeekday(1); } if(units==='quarter'){ this.month(Math.floor(this.month() / 3) * 3); } return this; } function endOf (units){ units=normalizeUnits(units); if(units===undefined||units==='millisecond'){ return this; } return this.startOf(units).add(1, (units==='isoWeek' ? 'week':units)).subtract(1, 'ms'); } function to_type__valueOf (){ return +this._d - ((this._offset||0) * 60000); } function unix (){ return Math.floor(+this / 1000); } function toDate (){ return this._offset ? new Date(+this):this._d; } function toArray (){ var m=this; return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()]; } function toObject (){ var m=this; return { years: m.year(), months: m.month(), date: m.date(), hours: m.hours(), minutes: m.minutes(), seconds: m.seconds(), milliseconds: m.milliseconds() };} function toJSON (){ return this.isValid() ? this.toISOString():null; } function moment_valid__isValid (){ return valid__isValid(this); } function parsingFlags (){ return extend({}, getParsingFlags(this)); } function invalidAt (){ return getParsingFlags(this).overflow; } function creationData(){ return { input: this._i, format: this._f, locale: this._locale, isUTC: this._isUTC, strict: this._strict };} addFormatToken(0, ['gg', 2], 0, function (){ return this.weekYear() % 100; }); addFormatToken(0, ['GG', 2], 0, function (){ return this.isoWeekYear() % 100; }); function addWeekYearFormatToken (token, getter){ addFormatToken(0, [token, token.length], 0, getter); } addWeekYearFormatToken('gggg', 'weekYear'); addWeekYearFormatToken('ggggg', 'weekYear'); addWeekYearFormatToken('GGGG', 'isoWeekYear'); addWeekYearFormatToken('GGGGG', 'isoWeekYear'); addUnitAlias('weekYear', 'gg'); addUnitAlias('isoWeekYear', 'GG'); addRegexToken('G', matchSigned); addRegexToken('g', matchSigned); addRegexToken('GG', match1to2, match2); addRegexToken('gg', match1to2, match2); addRegexToken('GGGG', match1to4, match4); addRegexToken('gggg', match1to4, match4); addRegexToken('GGGGG', match1to6, match6); addRegexToken('ggggg', match1to6, match6); addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token){ week[token.substr(0, 2)]=toInt(input); }); addWeekParseToken(['gg', 'GG'], function (input, week, config, token){ week[token]=utils_hooks__hooks.parseTwoDigitYear(input); }); function getSetWeekYear (input){ return getSetWeekYearHelper.call(this, input, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy); } function getSetISOWeekYear (input){ return getSetWeekYearHelper.call(this, input, this.isoWeek(), this.isoWeekday(), 1, 4); } function getISOWeeksInYear (){ return weeksInYear(this.year(), 1, 4); } function getWeeksInYear (){ var weekInfo=this.localeData()._week; return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); } function getSetWeekYearHelper(input, week, weekday, dow, doy){ var weeksTarget; if(input==null){ return weekOfYear(this, dow, doy).year; }else{ weeksTarget=weeksInYear(input, dow, doy); if(week > weeksTarget){ week=weeksTarget; } return setWeekAll.call(this, input, week, weekday, dow, doy); }} function setWeekAll(weekYear, week, weekday, dow, doy){ var dayOfYearData=dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), date=createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); this.year(date.getUTCFullYear()); this.month(date.getUTCMonth()); this.date(date.getUTCDate()); return this; } addFormatToken('Q', 0, 'Qo', 'quarter'); addUnitAlias('quarter', 'Q'); addRegexToken('Q', match1); addParseToken('Q', function (input, array){ array[MONTH]=(toInt(input) - 1) * 3; }); function getSetQuarter (input){ return input==null ? Math.ceil((this.month() + 1) / 3):this.month((input - 1) * 3 + this.month() % 3); } addFormatToken('w', ['ww', 2], 'wo', 'week'); addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); addUnitAlias('week', 'w'); addUnitAlias('isoWeek', 'W'); addRegexToken('w', match1to2); addRegexToken('ww', match1to2, match2); addRegexToken('W', match1to2); addRegexToken('WW', match1to2, match2); addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token){ week[token.substr(0, 1)]=toInt(input); }); function localeWeek (mom){ return weekOfYear(mom, this._week.dow, this._week.doy).week; } var defaultLocaleWeek={ dow:0, doy:6 }; function localeFirstDayOfWeek (){ return this._week.dow; } function localeFirstDayOfYear (){ return this._week.doy; } function getSetWeek (input){ var week=this.localeData().week(this); return input==null ? week:this.add((input - week) * 7, 'd'); } function getSetISOWeek (input){ var week=weekOfYear(this, 1, 4).week; return input==null ? week:this.add((input - week) * 7, 'd'); } addFormatToken('D', ['DD', 2], 'Do', 'date'); addUnitAlias('date', 'D'); addRegexToken('D', match1to2); addRegexToken('DD', match1to2, match2); addRegexToken('Do', function (isStrict, locale){ return isStrict ? locale._ordinalParse:locale._ordinalParseLenient; }); addParseToken(['D', 'DD'], DATE); addParseToken('Do', function (input, array){ array[DATE]=toInt(input.match(match1to2)[0], 10); }); var getSetDayOfMonth=makeGetSet('Date', true); addFormatToken('d', 0, 'do', 'day'); addFormatToken('dd', 0, 0, function (format){ return this.localeData().weekdaysMin(this, format); }); addFormatToken('ddd', 0, 0, function (format){ return this.localeData().weekdaysShort(this, format); }); addFormatToken('dddd', 0, 0, function (format){ return this.localeData().weekdays(this, format); }); addFormatToken('e', 0, 0, 'weekday'); addFormatToken('E', 0, 0, 'isoWeekday'); addUnitAlias('day', 'd'); addUnitAlias('weekday', 'e'); addUnitAlias('isoWeekday', 'E'); addRegexToken('d', match1to2); addRegexToken('e', match1to2); addRegexToken('E', match1to2); addRegexToken('dd', matchWord); addRegexToken('ddd', matchWord); addRegexToken('dddd', matchWord); addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token){ var weekday=config._locale.weekdaysParse(input, token, config._strict); if(weekday!=null){ week.d=weekday; }else{ getParsingFlags(config).invalidWeekday=input; }}); addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token){ week[token]=toInt(input); }); function parseWeekday(input, locale){ if(typeof input!=='string'){ return input; } if(!isNaN(input)){ return parseInt(input, 10); } input=locale.weekdaysParse(input); if(typeof input==='number'){ return input; } return null; } var defaultLocaleWeekdays='Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'); function localeWeekdays (m, format){ return isArray(this._weekdays) ? this._weekdays[m.day()] : this._weekdays[this._weekdays.isFormat.test(format) ? 'format':'standalone'][m.day()]; } var defaultLocaleWeekdaysShort='Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'); function localeWeekdaysShort (m){ return this._weekdaysShort[m.day()]; } var defaultLocaleWeekdaysMin='Su_Mo_Tu_We_Th_Fr_Sa'.split('_'); function localeWeekdaysMin (m){ return this._weekdaysMin[m.day()]; } function localeWeekdaysParse (weekdayName, format, strict){ var i, mom, regex; if(!this._weekdaysParse){ this._weekdaysParse=[]; this._minWeekdaysParse=[]; this._shortWeekdaysParse=[]; this._fullWeekdaysParse=[]; } for (i=0; i < 7; i++){ mom=local__createLocal([2000, 1]).day(i); if(strict&&!this._fullWeekdaysParse[i]){ this._fullWeekdaysParse[i]=new RegExp('^' + this.weekdays(mom, '').replace('.', '\.?') + '$', 'i'); this._shortWeekdaysParse[i]=new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\.?') + '$', 'i'); this._minWeekdaysParse[i]=new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\.?') + '$', 'i'); } if(!this._weekdaysParse[i]){ regex='^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, ''); this._weekdaysParse[i]=new RegExp(regex.replace('.', ''), 'i'); } if(strict&&format==='dddd'&&this._fullWeekdaysParse[i].test(weekdayName)){ return i; }else if(strict&&format==='ddd'&&this._shortWeekdaysParse[i].test(weekdayName)){ return i; }else if(strict&&format==='dd'&&this._minWeekdaysParse[i].test(weekdayName)){ return i; }else if(!strict&&this._weekdaysParse[i].test(weekdayName)){ return i; }} } function getSetDayOfWeek (input){ if(!this.isValid()){ return input!=null ? this:NaN; } var day=this._isUTC ? this._d.getUTCDay():this._d.getDay(); if(input!=null){ input=parseWeekday(input, this.localeData()); return this.add(input - day, 'd'); }else{ return day; }} function getSetLocaleDayOfWeek (input){ if(!this.isValid()){ return input!=null ? this:NaN; } var weekday=(this.day() + 7 - this.localeData()._week.dow) % 7; return input==null ? weekday:this.add(input - weekday, 'd'); } function getSetISODayOfWeek (input){ if(!this.isValid()){ return input!=null ? this:NaN; } return input==null ? this.day()||7:this.day(this.day() % 7 ? input:input - 7); } addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); addUnitAlias('dayOfYear', 'DDD'); addRegexToken('DDD', match1to3); addRegexToken('DDDD', match3); addParseToken(['DDD', 'DDDD'], function (input, array, config){ config._dayOfYear=toInt(input); }); function getSetDayOfYear (input){ var dayOfYear=Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1; return input==null ? dayOfYear:this.add((input - dayOfYear), 'd'); } function hFormat(){ return this.hours() % 12||12; } addFormatToken('H', ['HH', 2], 0, 'hour'); addFormatToken('h', ['hh', 2], 0, hFormat); addFormatToken('hmm', 0, 0, function (){ return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2); }); addFormatToken('hmmss', 0, 0, function (){ return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2); }); addFormatToken('Hmm', 0, 0, function (){ return '' + this.hours() + zeroFill(this.minutes(), 2); }); addFormatToken('Hmmss', 0, 0, function (){ return '' + this.hours() + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2); }); function meridiem (token, lowercase){ addFormatToken(token, 0, 0, function (){ return this.localeData().meridiem(this.hours(), this.minutes(), lowercase); }); } meridiem('a', true); meridiem('A', false); addUnitAlias('hour', 'h'); function matchMeridiem (isStrict, locale){ return locale._meridiemParse; } addRegexToken('a', matchMeridiem); addRegexToken('A', matchMeridiem); addRegexToken('H', match1to2); addRegexToken('h', match1to2); addRegexToken('HH', match1to2, match2); addRegexToken('hh', match1to2, match2); addRegexToken('hmm', match3to4); addRegexToken('hmmss', match5to6); addRegexToken('Hmm', match3to4); addRegexToken('Hmmss', match5to6); addParseToken(['H', 'HH'], HOUR); addParseToken(['a', 'A'], function (input, array, config){ config._isPm=config._locale.isPM(input); config._meridiem=input; }); addParseToken(['h', 'hh'], function (input, array, config){ array[HOUR]=toInt(input); getParsingFlags(config).bigHour=true; }); addParseToken('hmm', function (input, array, config){ var pos=input.length - 2; array[HOUR]=toInt(input.substr(0, pos)); array[MINUTE]=toInt(input.substr(pos)); getParsingFlags(config).bigHour=true; }); addParseToken('hmmss', function (input, array, config){ var pos1=input.length - 4; var pos2=input.length - 2; array[HOUR]=toInt(input.substr(0, pos1)); array[MINUTE]=toInt(input.substr(pos1, 2)); array[SECOND]=toInt(input.substr(pos2)); getParsingFlags(config).bigHour=true; }); addParseToken('Hmm', function (input, array, config){ var pos=input.length - 2; array[HOUR]=toInt(input.substr(0, pos)); array[MINUTE]=toInt(input.substr(pos)); }); addParseToken('Hmmss', function (input, array, config){ var pos1=input.length - 4; var pos2=input.length - 2; array[HOUR]=toInt(input.substr(0, pos1)); array[MINUTE]=toInt(input.substr(pos1, 2)); array[SECOND]=toInt(input.substr(pos2)); }); function localeIsPM (input){ return ((input + '').toLowerCase().charAt(0)==='p'); } var defaultLocaleMeridiemParse=/[ap]\.?m?\.?/i; function localeMeridiem (hours, minutes, isLower){ if(hours > 11){ return isLower ? 'pm':'PM'; }else{ return isLower ? 'am':'AM'; }} var getSetHour=makeGetSet('Hours', true); addFormatToken('m', ['mm', 2], 0, 'minute'); addUnitAlias('minute', 'm'); addRegexToken('m', match1to2); addRegexToken('mm', match1to2, match2); addParseToken(['m', 'mm'], MINUTE); var getSetMinute=makeGetSet('Minutes', false); addFormatToken('s', ['ss', 2], 0, 'second'); addUnitAlias('second', 's'); addRegexToken('s', match1to2); addRegexToken('ss', match1to2, match2); addParseToken(['s', 'ss'], SECOND); var getSetSecond=makeGetSet('Seconds', false); addFormatToken('S', 0, 0, function (){ return ~~(this.millisecond() / 100); }); addFormatToken(0, ['SS', 2], 0, function (){ return ~~(this.millisecond() / 10); }); addFormatToken(0, ['SSS', 3], 0, 'millisecond'); addFormatToken(0, ['SSSS', 4], 0, function (){ return this.millisecond() * 10; }); addFormatToken(0, ['SSSSS', 5], 0, function (){ return this.millisecond() * 100; }); addFormatToken(0, ['SSSSSS', 6], 0, function (){ return this.millisecond() * 1000; }); addFormatToken(0, ['SSSSSSS', 7], 0, function (){ return this.millisecond() * 10000; }); addFormatToken(0, ['SSSSSSSS', 8], 0, function (){ return this.millisecond() * 100000; }); addFormatToken(0, ['SSSSSSSSS', 9], 0, function (){ return this.millisecond() * 1000000; }); addUnitAlias('millisecond', 'ms'); addRegexToken('S', match1to3, match1); addRegexToken('SS', match1to3, match2); addRegexToken('SSS', match1to3, match3); var token; for (token='SSSS'; token.length <=9; token +='S'){ addRegexToken(token, matchUnsigned); } function parseMs(input, array){ array[MILLISECOND]=toInt(('0.' + input) * 1000); } for (token='S'; token.length <=9; token +='S'){ addParseToken(token, parseMs); } var getSetMillisecond=makeGetSet('Milliseconds', false); addFormatToken('z', 0, 0, 'zoneAbbr'); addFormatToken('zz', 0, 0, 'zoneName'); function getZoneAbbr (){ return this._isUTC ? 'UTC':''; } function getZoneName (){ return this._isUTC ? 'Coordinated Universal Time':''; } var momentPrototype__proto=Moment.prototype; momentPrototype__proto.add=add_subtract__add; momentPrototype__proto.calendar=moment_calendar__calendar; momentPrototype__proto.clone=clone; momentPrototype__proto.diff=diff; momentPrototype__proto.endOf=endOf; momentPrototype__proto.format=format; momentPrototype__proto.from=from; momentPrototype__proto.fromNow=fromNow; momentPrototype__proto.to=to; momentPrototype__proto.toNow=toNow; momentPrototype__proto.get=getSet; momentPrototype__proto.invalidAt=invalidAt; momentPrototype__proto.isAfter=isAfter; momentPrototype__proto.isBefore=isBefore; momentPrototype__proto.isBetween=isBetween; momentPrototype__proto.isSame=isSame; momentPrototype__proto.isSameOrAfter=isSameOrAfter; momentPrototype__proto.isSameOrBefore=isSameOrBefore; momentPrototype__proto.isValid=moment_valid__isValid; momentPrototype__proto.lang=lang; momentPrototype__proto.locale=locale; momentPrototype__proto.localeData=localeData; momentPrototype__proto.max=prototypeMax; momentPrototype__proto.min=prototypeMin; momentPrototype__proto.parsingFlags=parsingFlags; momentPrototype__proto.set=getSet; momentPrototype__proto.startOf=startOf; momentPrototype__proto.subtract=add_subtract__subtract; momentPrototype__proto.toArray=toArray; momentPrototype__proto.toObject=toObject; momentPrototype__proto.toDate=toDate; momentPrototype__proto.toISOString=moment_format__toISOString; momentPrototype__proto.toJSON=toJSON; momentPrototype__proto.toString=toString; momentPrototype__proto.unix=unix; momentPrototype__proto.valueOf=to_type__valueOf; momentPrototype__proto.creationData=creationData; momentPrototype__proto.year=getSetYear; momentPrototype__proto.isLeapYear=getIsLeapYear; momentPrototype__proto.weekYear=getSetWeekYear; momentPrototype__proto.isoWeekYear=getSetISOWeekYear; momentPrototype__proto.quarter=momentPrototype__proto.quarters=getSetQuarter; momentPrototype__proto.month=getSetMonth; momentPrototype__proto.daysInMonth=getDaysInMonth; momentPrototype__proto.week=momentPrototype__proto.weeks=getSetWeek; momentPrototype__proto.isoWeek=momentPrototype__proto.isoWeeks=getSetISOWeek; momentPrototype__proto.weeksInYear=getWeeksInYear; momentPrototype__proto.isoWeeksInYear=getISOWeeksInYear; momentPrototype__proto.date=getSetDayOfMonth; momentPrototype__proto.day=momentPrototype__proto.days=getSetDayOfWeek; momentPrototype__proto.weekday=getSetLocaleDayOfWeek; momentPrototype__proto.isoWeekday=getSetISODayOfWeek; momentPrototype__proto.dayOfYear=getSetDayOfYear; momentPrototype__proto.hour=momentPrototype__proto.hours=getSetHour; momentPrototype__proto.minute=momentPrototype__proto.minutes=getSetMinute; momentPrototype__proto.second=momentPrototype__proto.seconds=getSetSecond; momentPrototype__proto.millisecond=momentPrototype__proto.milliseconds=getSetMillisecond; momentPrototype__proto.utcOffset=getSetOffset; momentPrototype__proto.utc=setOffsetToUTC; momentPrototype__proto.local=setOffsetToLocal; momentPrototype__proto.parseZone=setOffsetToParsedOffset; momentPrototype__proto.hasAlignedHourOffset=hasAlignedHourOffset; momentPrototype__proto.isDST=isDaylightSavingTime; momentPrototype__proto.isDSTShifted=isDaylightSavingTimeShifted; momentPrototype__proto.isLocal=isLocal; momentPrototype__proto.isUtcOffset=isUtcOffset; momentPrototype__proto.isUtc=isUtc; momentPrototype__proto.isUTC=isUtc; momentPrototype__proto.zoneAbbr=getZoneAbbr; momentPrototype__proto.zoneName=getZoneName; momentPrototype__proto.dates=deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth); momentPrototype__proto.months=deprecate('months accessor is deprecated. Use month instead', getSetMonth); momentPrototype__proto.years=deprecate('years accessor is deprecated. Use year instead', getSetYear); momentPrototype__proto.zone=deprecate('moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779', getSetZone); var momentPrototype=momentPrototype__proto; function moment__createUnix (input){ return local__createLocal(input * 1000); } function moment__createInZone (){ return local__createLocal.apply(null, arguments).parseZone(); } var defaultCalendar={ sameDay:'[Today at] LT', nextDay:'[Tomorrow at] LT', nextWeek:'dddd [at] LT', lastDay:'[Yesterday at] LT', lastWeek:'[Last] dddd [at] LT', sameElse:'L' }; function locale_calendar__calendar (key, mom, now){ var output=this._calendar[key]; return isFunction(output) ? output.call(mom, now):output; } var defaultLongDateFormat={ LTS:'h:mm:ss A', LT:'h:mm A', L:'MM/DD/YYYY', LL:'MMMM D, YYYY', LLL:'MMMM D, YYYY h:mm A', LLLL:'dddd, MMMM D, YYYY h:mm A' }; function longDateFormat (key){ var format=this._longDateFormat[key], formatUpper=this._longDateFormat[key.toUpperCase()]; if(format||!formatUpper){ return format; } this._longDateFormat[key]=formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val){ return val.slice(1); }); return this._longDateFormat[key]; } var defaultInvalidDate='Invalid date'; function invalidDate (){ return this._invalidDate; } var defaultOrdinal='%d'; var defaultOrdinalParse=/\d{1,2}/; function ordinal (number){ return this._ordinal.replace('%d', number); } function preParsePostFormat (string){ return string; } var defaultRelativeTime={ future:'in %s', past:'%s ago', s:'a few seconds', m:'a minute', mm:'%d minutes', h:'an hour', hh:'%d hours', d:'a day', dd:'%d days', M:'a month', MM:'%d months', y:'a year', yy:'%d years' }; function relative__relativeTime (number, withoutSuffix, string, isFuture){ var output=this._relativeTime[string]; return (isFunction(output)) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number); } function pastFuture (diff, output){ var format=this._relativeTime[diff > 0 ? 'future':'past']; return isFunction(format) ? format(output):format.replace(/%s/i, output); } var prototype__proto=Locale.prototype; prototype__proto._calendar=defaultCalendar; prototype__proto.calendar=locale_calendar__calendar; prototype__proto._longDateFormat=defaultLongDateFormat; prototype__proto.longDateFormat=longDateFormat; prototype__proto._invalidDate=defaultInvalidDate; prototype__proto.invalidDate=invalidDate; prototype__proto._ordinal=defaultOrdinal; prototype__proto.ordinal=ordinal; prototype__proto._ordinalParse=defaultOrdinalParse; prototype__proto.preparse=preParsePostFormat; prototype__proto.postformat=preParsePostFormat; prototype__proto._relativeTime=defaultRelativeTime; prototype__proto.relativeTime=relative__relativeTime; prototype__proto.pastFuture=pastFuture; prototype__proto.set=locale_set__set; prototype__proto.months=localeMonths; prototype__proto._months=defaultLocaleMonths; prototype__proto.monthsShort=localeMonthsShort; prototype__proto._monthsShort=defaultLocaleMonthsShort; prototype__proto.monthsParse=localeMonthsParse; prototype__proto._monthsRegex=defaultMonthsRegex; prototype__proto.monthsRegex=monthsRegex; prototype__proto._monthsShortRegex=defaultMonthsShortRegex; prototype__proto.monthsShortRegex=monthsShortRegex; prototype__proto.week=localeWeek; prototype__proto._week=defaultLocaleWeek; prototype__proto.firstDayOfYear=localeFirstDayOfYear; prototype__proto.firstDayOfWeek=localeFirstDayOfWeek; prototype__proto.weekdays=localeWeekdays; prototype__proto._weekdays=defaultLocaleWeekdays; prototype__proto.weekdaysMin=localeWeekdaysMin; prototype__proto._weekdaysMin=defaultLocaleWeekdaysMin; prototype__proto.weekdaysShort=localeWeekdaysShort; prototype__proto._weekdaysShort=defaultLocaleWeekdaysShort; prototype__proto.weekdaysParse=localeWeekdaysParse; prototype__proto.isPM=localeIsPM; prototype__proto._meridiemParse=defaultLocaleMeridiemParse; prototype__proto.meridiem=localeMeridiem; function lists__get (format, index, field, setter){ var locale=locale_locales__getLocale(); var utc=create_utc__createUTC().set(setter, index); return locale[field](utc, format); } function list (format, index, field, count, setter){ if(typeof format==='number'){ index=format; format=undefined; } format=format||''; if(index!=null){ return lists__get(format, index, field, setter); } var i; var out=[]; for (i=0; i < count; i++){ out[i]=lists__get(format, i, field, setter); } return out; } function lists__listMonths (format, index){ return list(format, index, 'months', 12, 'month'); } function lists__listMonthsShort (format, index){ return list(format, index, 'monthsShort', 12, 'month'); } function lists__listWeekdays (format, index){ return list(format, index, 'weekdays', 7, 'day'); } function lists__listWeekdaysShort (format, index){ return list(format, index, 'weekdaysShort', 7, 'day'); } function lists__listWeekdaysMin (format, index){ return list(format, index, 'weekdaysMin', 7, 'day'); } locale_locales__getSetGlobalLocale('en', { ordinalParse: /\d{1,2}(th|st|nd|rd)/, ordinal:function (number){ var b=number % 10, output=(toInt(number % 100 / 10)===1) ? 'th' : (b===1) ? 'st' : (b===2) ? 'nd' : (b===3) ? 'rd':'th'; return number + output; }}); utils_hooks__hooks.lang=deprecate('moment.lang is deprecated. Use moment.locale instead.', locale_locales__getSetGlobalLocale); utils_hooks__hooks.langData=deprecate('moment.langData is deprecated. Use moment.localeData instead.', locale_locales__getLocale); var mathAbs=Math.abs; function duration_abs__abs (){ var data=this._data; this._milliseconds=mathAbs(this._milliseconds); this._days=mathAbs(this._days); this._months=mathAbs(this._months); data.milliseconds=mathAbs(data.milliseconds); data.seconds=mathAbs(data.seconds); data.minutes=mathAbs(data.minutes); data.hours=mathAbs(data.hours); data.months=mathAbs(data.months); data.years=mathAbs(data.years); return this; } function duration_add_subtract__addSubtract (duration, input, value, direction){ var other=create__createDuration(input, value); duration._milliseconds +=direction * other._milliseconds; duration._days +=direction * other._days; duration._months +=direction * other._months; return duration._bubble(); } function duration_add_subtract__add (input, value){ return duration_add_subtract__addSubtract(this, input, value, 1); } function duration_add_subtract__subtract (input, value){ return duration_add_subtract__addSubtract(this, input, value, -1); } function absCeil (number){ if(number < 0){ return Math.floor(number); }else{ return Math.ceil(number); }} function bubble (){ var milliseconds=this._milliseconds; var days=this._days; var months=this._months; var data=this._data; var seconds, minutes, hours, years, monthsFromDays; if(!((milliseconds >=0&&days >=0&&months >=0) || (milliseconds <=0&&days <=0&&months <=0))){ milliseconds +=absCeil(monthsToDays(months) + days) * 864e5; days=0; months=0; } data.milliseconds=milliseconds % 1000; seconds=absFloor(milliseconds / 1000); data.seconds=seconds % 60; minutes=absFloor(seconds / 60); data.minutes=minutes % 60; hours=absFloor(minutes / 60); data.hours=hours % 24; days +=absFloor(hours / 24); monthsFromDays=absFloor(daysToMonths(days)); months +=monthsFromDays; days -=absCeil(monthsToDays(monthsFromDays)); years=absFloor(months / 12); months %=12; data.days=days; data.months=months; data.years=years; return this; } function daysToMonths (days){ return days * 4800 / 146097; } function monthsToDays (months){ return months * 146097 / 4800; } function as (units){ var days; var months; var milliseconds=this._milliseconds; units=normalizeUnits(units); if(units==='month'||units==='year'){ days=this._days + milliseconds / 864e5; months=this._months + daysToMonths(days); return units==='month' ? months:months / 12; }else{ days=this._days + Math.round(monthsToDays(this._months)); switch (units){ case 'week':return days / 7 + milliseconds / 6048e5; case 'day':return days + milliseconds / 864e5; case 'hour':return days * 24 + milliseconds / 36e5; case 'minute':return days * 1440 + milliseconds / 6e4; case 'second':return days * 86400 + milliseconds / 1000; case 'millisecond': return Math.floor(days * 864e5) + milliseconds; default: throw new Error('Unknown unit ' + units); }} } function duration_as__valueOf (){ return ( this._milliseconds + this._days * 864e5 + (this._months % 12) * 2592e6 + toInt(this._months / 12) * 31536e6 ); } function makeAs (alias){ return function (){ return this.as(alias); };} var asMilliseconds=makeAs('ms'); var asSeconds=makeAs('s'); var asMinutes=makeAs('m'); var asHours=makeAs('h'); var asDays=makeAs('d'); var asWeeks=makeAs('w'); var asMonths=makeAs('M'); var asYears=makeAs('y'); function duration_get__get (units){ units=normalizeUnits(units); return this[units + 's'](); } function makeGetter(name){ return function (){ return this._data[name]; };} var milliseconds=makeGetter('milliseconds'); var seconds=makeGetter('seconds'); var minutes=makeGetter('minutes'); var hours=makeGetter('hours'); var days=makeGetter('days'); var months=makeGetter('months'); var years=makeGetter('years'); function weeks (){ return absFloor(this.days() / 7); } var round=Math.round; var thresholds={ s: 45, m: 45, h: 22, d: 26, M: 11 }; function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale){ return locale.relativeTime(number||1, !!withoutSuffix, string, isFuture); } function duration_humanize__relativeTime (posNegDuration, withoutSuffix, locale){ var duration=create__createDuration(posNegDuration).abs(); var seconds=round(duration.as('s')); var minutes=round(duration.as('m')); var hours=round(duration.as('h')); var days=round(duration.as('d')); var months=round(duration.as('M')); var years=round(duration.as('y')); var a=seconds < thresholds.s&&['s', seconds] || minutes <=1&&['m'] || minutes < thresholds.m&&['mm', minutes] || hours <=1&&['h'] || hours < thresholds.h&&['hh', hours] || days <=1&&['d'] || days < thresholds.d&&['dd', days] || months <=1&&['M'] || months < thresholds.M&&['MM', months] || years <=1&&['y']||['yy', years]; a[2]=withoutSuffix; a[3]=+posNegDuration > 0; a[4]=locale; return substituteTimeAgo.apply(null, a); } function duration_humanize__getSetRelativeTimeThreshold (threshold, limit){ if(thresholds[threshold]===undefined){ return false; } if(limit===undefined){ return thresholds[threshold]; } thresholds[threshold]=limit; return true; } function humanize (withSuffix){ var locale=this.localeData(); var output=duration_humanize__relativeTime(this, !withSuffix, locale); if(withSuffix){ output=locale.pastFuture(+this, output); } return locale.postformat(output); } var iso_string__abs=Math.abs; function iso_string__toISOString(){ var seconds=iso_string__abs(this._milliseconds) / 1000; var days=iso_string__abs(this._days); var months=iso_string__abs(this._months); var minutes, hours, years; minutes=absFloor(seconds / 60); hours=absFloor(minutes / 60); seconds %=60; minutes %=60; years=absFloor(months / 12); months %=12; var Y=years; var M=months; var D=days; var h=hours; var m=minutes; var s=seconds; var total=this.asSeconds(); if(!total){ return 'P0D'; } return (total < 0 ? '-':'') + 'P' + (Y ? Y + 'Y':'') + (M ? M + 'M':'') + (D ? D + 'D':'') + ((h||m || s) ? 'T':'') + (h ? h + 'H':'') + (m ? m + 'M':'') + (s ? s + 'S':''); } var duration_prototype__proto=Duration.prototype; duration_prototype__proto.abs=duration_abs__abs; duration_prototype__proto.add=duration_add_subtract__add; duration_prototype__proto.subtract=duration_add_subtract__subtract; duration_prototype__proto.as=as; duration_prototype__proto.asMilliseconds=asMilliseconds; duration_prototype__proto.asSeconds=asSeconds; duration_prototype__proto.asMinutes=asMinutes; duration_prototype__proto.asHours=asHours; duration_prototype__proto.asDays=asDays; duration_prototype__proto.asWeeks=asWeeks; duration_prototype__proto.asMonths=asMonths; duration_prototype__proto.asYears=asYears; duration_prototype__proto.valueOf=duration_as__valueOf; duration_prototype__proto._bubble=bubble; duration_prototype__proto.get=duration_get__get; duration_prototype__proto.milliseconds=milliseconds; duration_prototype__proto.seconds=seconds; duration_prototype__proto.minutes=minutes; duration_prototype__proto.hours=hours; duration_prototype__proto.days=days; duration_prototype__proto.weeks=weeks; duration_prototype__proto.months=months; duration_prototype__proto.years=years; duration_prototype__proto.humanize=humanize; duration_prototype__proto.toISOString=iso_string__toISOString; duration_prototype__proto.toString=iso_string__toISOString; duration_prototype__proto.toJSON=iso_string__toISOString; duration_prototype__proto.locale=locale; duration_prototype__proto.localeData=localeData; duration_prototype__proto.toIsoString=deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', iso_string__toISOString); duration_prototype__proto.lang=lang; addFormatToken('X', 0, 0, 'unix'); addFormatToken('x', 0, 0, 'valueOf'); addRegexToken('x', matchSigned); addRegexToken('X', matchTimestamp); addParseToken('X', function (input, array, config){ config._d=new Date(parseFloat(input, 10) * 1000); }); addParseToken('x', function (input, array, config){ config._d=new Date(toInt(input)); }); utils_hooks__hooks.version='2.12.0'; setHookCallback(local__createLocal); utils_hooks__hooks.fn=momentPrototype; utils_hooks__hooks.min=min; utils_hooks__hooks.max=max; utils_hooks__hooks.now=now; utils_hooks__hooks.utc=create_utc__createUTC; utils_hooks__hooks.unix=moment__createUnix; utils_hooks__hooks.months=lists__listMonths; utils_hooks__hooks.isDate=isDate; utils_hooks__hooks.locale=locale_locales__getSetGlobalLocale; utils_hooks__hooks.invalid=valid__createInvalid; utils_hooks__hooks.duration=create__createDuration; utils_hooks__hooks.isMoment=isMoment; utils_hooks__hooks.weekdays=lists__listWeekdays; utils_hooks__hooks.parseZone=moment__createInZone; utils_hooks__hooks.localeData=locale_locales__getLocale; utils_hooks__hooks.isDuration=isDuration; utils_hooks__hooks.monthsShort=lists__listMonthsShort; utils_hooks__hooks.weekdaysMin=lists__listWeekdaysMin; utils_hooks__hooks.defineLocale=defineLocale; utils_hooks__hooks.updateLocale=updateLocale; utils_hooks__hooks.locales=locale_locales__listLocales; utils_hooks__hooks.weekdaysShort=lists__listWeekdaysShort; utils_hooks__hooks.normalizeUnits=normalizeUnits; utils_hooks__hooks.relativeTimeThreshold=duration_humanize__getSetRelativeTimeThreshold; utils_hooks__hooks.prototype=momentPrototype; var _moment=utils_hooks__hooks; return _moment; })); jQuery(document).ready(function(){ jQuery('.search-top').click(function(){ jQuery('#masthead .search-form-top').toggle(); }); }); jQuery(document).ready(function(){ jQuery('#scroll-up').hide(); jQuery(function (){ jQuery(window).scroll(function (){ if(jQuery(this).scrollTop() > 1000){ jQuery('#scroll-up').fadeIn(); }else{ jQuery('#scroll-up').fadeOut(); }}); jQuery('a#scroll-up').click(function (){ jQuery('body,html').animate({ scrollTop: 0 }, 800); return false; }); }); }); jQuery(document).ready(function(){ jQuery('.better-responsive-menu #site-navigation .menu-item-has-children').append(' '); jQuery('.better-responsive-menu #site-navigation .sub-toggle').click(function(){ jQuery(this).parent('.menu-item-has-children').children('ul.sub-menu').first().slideToggle('1000'); jQuery(this).children('.fa-caret-right').first().toggleClass('fa-caret-down'); jQuery(this).toggleClass('active'); }); }); jQuery(document).on('click', '#site-navigation ul li.menu-item-has-children > a', function(event){ var menuClass=jQuery(this).parent('.menu-item-has-children'); if(! menuClass.hasClass('focus')&&jQuery(window).width() <=768){ menuClass.addClass('focus'); event.preventDefault(); menuClass.children('.sub-menu').css({ 'display': 'block' }); }});